Originally posted by Ganeshkumar cheekati:
When we are invoking methods to modify that it creates a new object with modified content.
[/QB]
So the trick is if the new content is different (modified), then a new object is created, hence the == will return false. Also if the "new" keyword is used a new object is created, then == will also return false. I.e.
"String" == new String("String")
is false.
[ December 15, 2008: Message edited by: Duc Vo ]