📅  最后修改于: 2022-03-11 14:58:55.308000             🧑  作者: Mango
int[] data = {1,2,3,4,5,6,7,8,9,10};
// To boxed array
Integer[] what = Arrays.stream( data ).boxed().toArray( Integer[]::new );
Integer[] ever = IntStream.of( data ).boxed().toArray( Integer[]::new );
// To boxed list
List you = Arrays.stream( data ).boxed().collect( Collectors.toList() );
List like = IntStream.of( data ).boxed().collect( Collectors.toList() );