- toList operation on Collectors provides a way to aggregate the result of a stream operation into a List.
int stream one to three-three
IntStream oneToThree_three = IntStream.of(1, 2, 3, 3);
USAGE
List<Integer> resultList = oneToThree_three.boxed().filter(number -> number > 2).collect(Collectors.toList());
Comments
Post a comment