List<Integer> res = new ArrayList<>();
int[] arr = res.stream().mapToInt(i -> i).toArray()
  • 1.
  • 2.