A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
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.
500+ Java Interview Questions and Answers | Java job hunting know how & Java resumes
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-2015