Exception in thread "main" java.lang.Error: Unresolved compilation problems:
importjava.awt.List;importjava.util.ArrayList;importjava.util.Arrays;publicclassWwArr...
import java.awt.List;
import java.util.ArrayList;
import java.util.Arrays;
public class WwArrays {
public static void main(String[] args) {
int[] e = {1,2,22,32,12,325,323,42};
List<int[]> list = new ArrayList<int[]>();
list = Arrays.asList(e);
System.out.println(List.get(0)[1]);
}
报了一个异常:请各位大虾帮我看看问题出在哪?
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The type List is not generic; it cannot be parameterized with arguments <int[]>
The method get(int) is undefined for the type List
点击左边的小问号说:
the type List is not generic ,it can not be parameterized with argments int[]. 展开
import java.util.ArrayList;
import java.util.Arrays;
public class WwArrays {
public static void main(String[] args) {
int[] e = {1,2,22,32,12,325,323,42};
List<int[]> list = new ArrayList<int[]>();
list = Arrays.asList(e);
System.out.println(List.get(0)[1]);
}
报了一个异常:请各位大虾帮我看看问题出在哪?
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The type List is not generic; it cannot be parameterized with arguments <int[]>
The method get(int) is undefined for the type List
点击左边的小问号说:
the type List is not generic ,it can not be parameterized with argments int[]. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询