This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes hashcode() in java 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() in java" Watch "hashcode() in java" New topic
Author

hashcode() in java

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
What is the use of the hashcode() in java?
with respect to entity beans, how is the hashcode() used for?


SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14952
    
  26

Read the Javadoc documentation of the method hashCode() in class Object. It says:

"This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable."

Here are some articles with more information (found in 5 seconds with Google):
Java theory and practice: Hashing it out
HashCodes in a Nutshell


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Not an advanced question. Moving...


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hashcode() in java
 
It's not a secret anymore!