- 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() == a3.getClass());//出错
- System.out.println(a1.getClass() == a4.getClass());//出错
复制代码
提示为Incompatible operand types Class<capture#3-of ? extends int[]> and Class<capture#4-of ? extends int[][]>
这是为什么啊? |