public class HelloWorld {
public static void main(String[] args) {
String s1="yes";
String s2="yes";
System.out.println("-------The result is-----"+ s1==s2);
System.out.println("-------The result is-----"+ (s1==s2));
}
}
Why the above code produce the output
"false"
-------The result is-----true