Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

what is Object equal and hash code will do

807569Aug 29 2006 — edited Aug 30 2006
Hi,

Can anyone explain, what is actually thing happen with equals and hashcode, I mean when u create a object what exactly happen with equals and hashcode methods.

when I create a string s = "abc"; s1= new String("abc");
Both hashcodes r same. but the references is different. this time how jvm come to know the memory references.


Thanks in Advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2006
Added on Aug 29 2006
2 comments
46 views