Java List

// int[]转List
List list = Arrays.stream(arr).boxed().collect(Collectors.toList());

//List转int
int[] arr =  list.stream().mapToInt(Integer::valueOf).toArray();

你可能感兴趣的:(Java List