List转int数组

1
2
List<Integer> result = new ArrayList<>();
result.stream().mapToInt(Integer::valueOf).toArray();