本帖最后由 勾尧 于 2012-12-24 23:01 编辑
按照张老师的程序写得,为什么我的报错误,求助下,图片为视频中代码
红色的是错误的代码
int [] a1 = new int[3];
int [] a2 = new int[4];
int [][] a3 = new int[2][3];
String [] a4 = new String[3];
System.out.println(a1.getClass()==a2.getClass());
//System.out.println(a1.getClass()==a4.getClass());
//System.out.println(a1.getClass()==a3.getClass());
System.out.println(a1.getClass().getName());
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Incompatible operand types Class<capture#8-of ? extends int[]> and Class<capture#9-of ? extends String[]>
Incompatible operand types Class<capture#10-of ? extends int[]> and Class<capture#11-of ? extends int[][]>
|
|