import java.util.*;
class ArraysDemo
{
public static void main(String[] args)
{
int[] nums = {2,3,5,6};
List<int[]> li = Arrays.asList(nums);
System.out.println(li);
Integer num2 = {4,5,1};
List<Integer> li2 = Arrays.asList(num2);
System.out.println(li2);
}
}
E:\java\Java1111\day17>javac ArraysDemo.java
ArraysDemo.java:24: 错误: Integer的初始化程序不合法
Integer num2 = {4,5,1};
^
1 个错误
|
|