What will be the output of the following code?
String s1 = new String("Java");
String s2 = new String("Java");
System.out.println(s1 == s2);
true
false
Compilation Error
Runtime Exception
This question is part of this quiz :
Java String Basics