2021年7月7日

int[] 转 List 的最佳写法

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

 


“以书为舟,遨游尘世”,
最好的免费 kindle 电子书分享站:

You may also like...

发表回复

您的电子邮箱地址不会被公开。


*