Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes hashCode() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "hashCode()" Watch "hashCode()" New topic
Author

hashCode()

mike molin
Greenhorn

Joined: Nov 11, 2010
Posts: 17
Hi
can some explain what hashCode() is for me, how it works when to use it and why, and maybe give me and example. why not use equals instead
/Kiades
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

mike molin wrote:Hi
can some explain what hashCode() is for me, how it works when to use it and why, and maybe give me and example. why not use equals instead
/Kiades

What the hashcode contract says about?
Also check out http://java.dzone.com/articles/java-hashing. Let us know, if there is any query.


http://muhammadkhojaye.blogspot.com/
 
 
subject: hashCode()
 
Similar Threads
code generation of an effective hashCode
WHat is the use of hashcode()
hashCode() problem
Does this guarantee a unique client?
Help on Hashcode