int[]向其他数组转换

int[] ints = new int[]{1,2,3,4};
Integer[] Integers = Arrays.stream(ints).boxed().toArray(Integer[]::new);
List<Integer> list= Arrays.stream(ints).boxed().collect(Collectors.toList());
List<String> strList = Arrays.stream(ints).boxed().map(String::valueOf).collect(Collectors.toList());

Integer[]向其他数组转换

Integer[] integers = new Integer[]{1,2,3,4};
int[] ints = Arrays.stream(integers).mapToInt(Integer::valueOf).toArray();
List[Integer] integers = Arryas.asList(integers);
List<String> list = Arrays.stream(integers).map(String::valueOf).collect(Collector.toList());