gerenvip 发表于 2013-4-27 19:28
我估计也是这样的,呵呵!谢啦,让我放心啦
我刚才有尝试了一下,你这样试一试:
-
- int[] a1 = new int[]{1,2,3};
- int[] a2 = new int[4];
- int[][] a3 = new int[2][3];
- String[] a4 = new String[]{"a","b","c"};
-
- System.out.println(a1.getClass() == a2.getClass());
- System.out.println((Object)a1.getClass() == a3.getClass());
- System.out.println((Object)a1.getClass().getName());
- System.out.println((Object)a1.getClass() == a4.getClass());
-
复制代码 |