aspose file tools*
The moose likes Java in General and the fly likes Hashcode & equals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Hashcode & equals" Watch "Hashcode & equals" New topic
Author

Hashcode & equals

siva mail
Greenhorn

Joined: Jan 25, 2009
Posts: 19
Hi Ranchers ,

Can you please tell me how Hashcode & Equals are related to each other. I didnt get how equals & Hashcode methods are called when you are calling get method on HashMap. In what are all scenarios these Hashcode & Equals are called internally.

your help is Appreciated

Thanks in advance
Siva
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19783
    
  20

Check out the API for Object. The contract for both methods, and the relation between them, is quite clearly documented.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hashcode & equals