What is the output of the following code?
```
public class Test {
public static void main(String[] args) {
String s1 = new String("Welcome to Java!");
String s2 = s1.toUpperCase();
if (s1 == s2)
System.out.println("s1 and s2 reference to the same String object");
else if (s1.equals(s2))
System.out.println("s1 and s2 have the same contents");
else
System.out.println("s1 and s2 have different contents");
}
}
```
a. s1 and s2 reference to the same String object
b. s1 and s2 have the same contents
c. s1 and s2 have different contents
c. s1 and s2 have different contents
You might also like to view...
HTTP describes a set of and that allow clients and servers to in- teract.
Fill in the blank(s) with the appropriate word(s).
The numbers in an IP address are separated by ____.
A. commas B. colons C. semicolons D. periods