wood burning stoves 2.0*
The moose likes Beginning Java 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "hashcode" Watch "hashcode" New topic
Author

hashcode

Surya Bavirti
Greenhorn

Joined: Sep 08, 2008
Posts: 13
obj1,obj2 are from same class.is the hashcode() of obj1,obj2 are equal?.Suppose if two objects of same class having equal hashcode,does it mean that the two objects are equal?
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
No, the contract is that if two objects are equal then they must return the same hashCode but the reverse is not always true.


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hashcode