张然龙 发表于 2014-5-27 20:41
System.out.println(a.hashCode()==(x+y).hashCode()); //比较内存地址,结果为true,是一样的!!
wisely 发表于 2014-5-28 13:22
这个好理解。只要a.equals(x+y)为true,那么a.hashCode()==(x+y).hashCode()就为true。比较的不是内存地 ...
张然龙 发表于 2014-5-27 20:41
System.out.println(a.hashCode()==(x+y).hashCode()); //比较内存地址,结果为true,是一样的!!
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |