Sunday, 22 February 2015

What’s the difference between == and equals method?

equals checks for the content of the string objects while

== checks for the fact that the two String objects point to same memory location ie they are same references.

No comments:

Post a Comment