2021年7月7日

int[] 转 List 的最佳写法

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

 


“谈笑有鸿儒,往来无白丁”,
社长桩白墨邀你加入星链社区,
开启365天的浪漫生活。

You may also like...

发表回复

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


*