This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Overriding and Implementation of 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 "Overriding and Implementation of hashcode() " Watch "Overriding and Implementation of hashcode() " New topic
Author

Overriding and Implementation of hashcode()

Pranav Bhatt
Ranch Hand

Joined: Mar 20, 2006
Posts: 284
Hi,
Can anyone please explain me the concept of overriding of hashCode()? I'am clear with the concept of overriding of equals() method. But am still not clear with the hashCode(), it will help if you could provide me with some examples. And why is it necessary to override hashCode() along with equal().

thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Overriding and Implementation of hashcode()
 
Similar Threads
equals() & hashCode()
Overridding and Exceptions in KB book
Overriding and Implementation of hashcode()
Equals and Hashcode
Question on casting