In the following code fragment, line 4 is executed.
1. String s1 = "xyz"; 2. String s2 = new String(s1); 3. if (s1 == s2) 4. System.out.println("Line 4");
B.
Line 1 constructs a new instance of String and stores it in the string pool.
Line 2 explicitly constructs another instance.