java 对象比较,
分享于 点击 9479 次 点评:162
java 对象比较,
对象比较主要是 hashcode 与equels 这两个方法 ,其中hashcode 与equels 方法 可由 myeclipse 自动生成。
值就必须相等。
如果不是要保存在HashSet或HashMap,则与hashcode没有什么关系了,这时候hashcode
不等是可以的
相关文章
- 暂无相关文章
对象比较主要是 hashcode 与equels 这两个方法 ,其中hashcode 与equels 方法 可由 myeclipse 自动生成。
用户点评