Hi Every one,
I read in various books, forums and believed that irrespective of
string manipulation on literals string == operator will always return true, here is a very simple program and its output i want to to know why string1==string4 returns false ? even though both are string literals. Does it mean a string concatenation on string literals will return a new object ?
Runs Output:
string1= helloWorld
string2= helloWorld
string3= hell
string4= helloWorld
string1==string2 is true
string1==string4 is false
Thanks.