xxxxxxxxxx
int[] array = {1, 2, 3, 4};
IntStream intStream = Arrays.stream(array);
List<Integer> list = intStream.boxed().collect(Collectors.toList());
//Alternatively, you can use the toArray() method provided by the IntStream class to convert the stream to array, then you can use the Arrays.asList() method to convert that array to a list.
int[] array = {1, 2, 3, 4};
IntStream intStream = Arrays.stream(array);
List<Integer> list = Arrays.asList(intStream.toArray());