How to convert int[] into List in Java?

Streams In Java 8+ you can make a stream of your int array. Call either Arrays.stream or IntStream.of. Call IntStream#boxed to use boxing conversion from int primitive to Integer objects. Collect into a list using Stream.collect( Collectors.toList() ). Or more simply in Java 16+, call Stream#toList(). Example: int[] ints = {1,2,3}; List<Integer> list = Arrays.stream(ints).boxed().collect(Collectors.toList()); … Read more