A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 林豪 中级黑马   /  2012-5-20 14:38  /  1231 人查看  /  1 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

int [] a1 = new int[3];
                int [] a2 = new int[4];
                int[][] a3 = new int[3][4];
                String[] a4 = new String[3];
                System.out.println(a1.getClass() == a2.getClass());
                System.out.println(a1.getClass() == a3.getClass());  //编译错误:Incompatible operand types Class<capture#8-of ? extends int[]> and Class<capture#9-of ? extends int[][]>
                System.out.println(a1.getClass() == a4.getClass());  //编译错误:Incompatible operand types Class<capture#10-of ? extends int[]> and Class<capture#11-of ? extends String[]>
求解原因呀!!!我看张老师写的好好的

1 个回复

正序浏览
以前我问过这个问题。
似乎是Jdk版本问题。
下面是我以前问的网址。
http://bbs.itheima.com/thread-11581-1-1.html
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马