File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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!"
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: hashCode()
 
Similar Threads
hash collision avoid ?
Hash Function
doubt regarding hashcode
equals and hashcode methods
collections