Core java Object's equals() method comparing with ==operator
Deepak Bobal
Ranch Hand
Joined: Feb 06, 2008
Posts: 96
posted
0
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 Deepak