int[] 转 List 的最佳写法 int[] a = new int[]{1, 2, 3}; List<Integer> l = Arrays.stream(a).boxed().collect(Collectors.toList());