How-to articles, tricks, and solutions about BOXING

How to convert int[] into List<Integer> in Java?

To convert an int[] array into a List<Integer> in Java, you can use the method to create a stream of the array, and then use the mapToObj() method to map each element of the stream to an Integer object.