posted 17 years ago
I wanted to know why the output is true for s1==s2 if:
s1="Hello"
s2="Hello"
System.out.println(s1==s2)
//== looks into the bit patterns of variable; as String literal variable s1 and s2 have the same bit pattern which reads Hello. And thats why s1==s2 is true.
Is my argument right?