I thought "==" operator checks to see if the objects being compared are the same object reference till I tried the foll:
Sting s1="Hello";
Sting s2="Hello";
I tested with System.out.println(s1==s2?"same":"no");
I expected the answer to be "no" but I got "same";
But when I modified the code as under
String s1="hello";
String s2="he";
Stirng s3=s2+"llo";
and tested s1==s3? I got the answer "no".
Am I missing out on some concept here?