File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Sep 08, 2008
Sep 30, 2008 23:32:00
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?
Joined: May 31, 2007
Sep 30, 2008 23:38:00
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
Java Interview Books
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
about equals method?
Question about hashcode()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014