0
List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);

Open 1 Answers 35 Views Education

List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);

1 Answer

0

List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);

//get list of unique squares

List<Integer> squaresList = numbers.stream().map( i -> i*i).distinct().collect(Collectors.toList());

by (54.6k points)
...