What is the fast method for converting List<Integer> to int[] array, rather than using mapToInt()
List<Integer>
int[]
mapToInt()
List<Integer> list = new ArrayList<>(Arrays.asList(1,2,3)); list.stream().mapToInt(i->i.intValue()).toArray();