标签:
hashcode这个方法是用来鉴定2个对象是否相等的。要从物理上判断2个对象是否相等,用==就可以了
HashCode() is explicitly used in methods where hash functions are used, like hashTable() etc.
One should always override hashCode() when overriding equals(). Unexpected behaviour will occur if you don‘t do so.
HashCode() should have the same value whenever equals() returns true.
标签:
原文地址:http://my.oschina.net/u/1455908/blog/382908