0

How do I convert a Java 8 IntStream to a List?

Java
List<Integer> intList = myIntStream.mapToObj(i -> i)
  								   .collect(Collectors.toList());
add comment
Suggest a different solution or add another example