Junior — Senior
String comparison test using the == operator
livecode
Task condition
Determine what text will appear in the standard output when the following program is executed.
public class Test1 {
public static void main(String[] args) {
var s1 = "a";
var s2 = "a";
var s3 = new String("a");
System.out.println("s1 == s2: " + (s1 == s2));
System.out.println("s1 == s3: " + (s1 == s3));
}
}