Bookmark Topic Watch Topic
  • New Topic

Core java Object's equals() method comparing with ==operator  RSS feed

Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am confused taking the difference between equals and == operator.How and where the work?And one more thing,what does it stand foe equating two object references ?
if Integer a=2;
and Integer b=3;
and if i do a=b;
so according to me bit pattern of b is copied to a .But when i see output i get value of b is transformed to a.And giving True while using equals() and ==.
I m bit confused.
please help me out.
Thanks n regards
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!