Snippets tagged “boxed”
1 snippet uses this tag.
- How to convert int[] into List<Integer> in Java?Java
To convert an int[] array into a List<Integer> in Java, you can use the Arrays.stream() 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.