Naresh Shanmugam wrote:
Hope equals method would be invoked everytime an object is added...![]()
Thanks and Regards,
SCJP 1.5 (90%), SCWCD 1.5 (85%), The Jovial Java, java.util.concurrent tutorial
No.Naresh Shanmugam wrote:Does that mean hashcode does some part of equality checking??
Naresh Shanmugam wrote:In the above scenario i am trying to add same "obj" twice, on the same bucket. Second time it should have called "equals" method to check for the presence of the same element(because already elements exist on the same bucket), but it didnt invoke "equals" method !!! --- Does that mean hashcode does some part of equality checking??
Naresh Shanmugam wrote:
In the above scenario i am trying to add same "obj" twice, on the same bucket. Second time it should have called "equals" method to check for the presence of the same element(because already elements exist on the same bucket), but it didnt invoke "equals" method !!! --- Does that mean hashcode does some part of equality checking??
Thanks and Regards,
SCJP 1.5 (90%), SCWCD 1.5 (85%), The Jovial Java, java.util.concurrent tutorial
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |