Arrays.asList期望可变数量的
Object。
int不是
Object,而是
int[],因此
Arrays.asList(A)将仅创建
List<int[]>一个元素。
您可以使用
IntStream.of(A).boxed().collect(Collectors.toList());

Arrays.asList期望可变数量的
Object。
int不是
Object,而是
int[],因此
Arrays.asList(A)将仅创建
List<int[]>一个元素。
您可以使用
IntStream.of(A).boxed().collect(Collectors.toList());