本帖最后由 kkopopo 于 2014-2-24 22:28 编辑  
- 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() == a4.getClass());
 
  复制代码 
最后两句代码编译不通过  报错类型不匹配 
可是在黑马张老师视频中教学过程中编译通过了? 
why? 
视频中截图代码!  千万别和我说我的JDK是7.0的缘故,或者我用的Eclispe  老师用的是MyEclipse! 
 
我觉得老师的能通过很神奇 因为因为字节码也是对象,是对象就有不同类型 
这就好比让一个 
Sring s = "abc" 
Person p; 
sop(s == p);//一样 
 
 
 |   
        
 
    
    
    
     
 
 |