When I compare string s1 and s2 it give equal result but with s3 it gives a different result
String s1="Hello"
String s2="Hello"
String s3=new String("Hello");
Output
s1==s2 //true
s1.equals(s2) //false
s1==s3 //false
s1.equals(s3) //true
why does it produce different output even if the string is the same?