Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import java.util.HashSet;
- import java.util.Set;
- public class Delete2 {
- public static void main(String args[]) {
- Integer[] inputArray = {1, 1, 3, 4, 4, 4, 4, 4, 5, 6, 7, 7};
- Set<Integer> list = new HashSet<>(Arrays.asList(inputArray));
- list.forEach(System.out::println);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment