What is the output of the following code?
String s1 = “Java”;
String s2 = new String(“Java”);
System.out.println(s1 == s2);
==
compares references, not content. Use .equals()
for content comparison.
==
compares references, not content. Use .equals()
for content comparison.