ArrayList转int数组

流式转换

int[] a = list.stream().mapToInt(Integer::intValue).toArray();
原文地址:https://www.cnblogs.com/chaostudy/p/13576026.html