Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes hashCode() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "hashCode()" Watch "hashCode()" New topic
Author

hashCode()

sanjana narayanan
Ranch Hand

Joined: Nov 25, 2003
Posts: 142
Hi,
Can anyone explain the following statement on hashCode with an eg?
"Ideally, a hash funtion should distribute any reasonable collection of unequal instances uniformly across all possible hash values."
-Sanjana
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi Sanjana,
I think it's best to check the following article
it helped me understanding the necessary details.
Article on Equals and Hash Code
Greetings,
Gian Franco


"Eppur si muove!"
 
jQuery in Action, 2nd edition
 
subject: hashCode()