2

What is the fast method for converting List<Integer> to int[] array, rather than using mapToInt()

List<Integer> list = new ArrayList<>(Arrays.asList(1,2,3));
list.stream().mapToInt(i->i.intValue()).toArray();
0xh3xa
  • 4,801
  • 2
  • 14
  • 28

0 Answers0