This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


sanjana narayanan
Ranch Hand

Joined: Nov 25, 2003
Posts: 142
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."
Gian Franco
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
Gian Franco

"Eppur si muove!"
GeeCON Prague 2014
subject: hashCode()