- //数组与Object的关系
- int [] a1 = new int[]{1,2,3};
- int [] a4 = new int[5];
- int [][] a2 = new int[2][3];
- String [] a3 = new String[]{"adf"};
- System.out.println(a1.getClass() == a4.getClass());
- System.out.println(a1.getClass() == a2.getClass());//为什么这一行提示错误呢?我仅仅是判断字节码是否相同啊
复制代码
|
|