110

hashcode的作用-12212886-51CTO博客

 6 years ago
source link: http://blog.51cto.com/12222886/2067936
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
    真感觉这篇文章没必要记录,还是写下吧。。。    首先hashCode()方法被设计在Object类中,说明是希望所有对象都能实现该方法,该方法是会返回一个对应于当前对象的整数,理论上是需要不同对象的hashCode不相同。之所以所有对象都实现该方法是为了将来对象在查找时变得快捷。  &nb

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK