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
You might also like to view...
Excel templates use the .xlsx file extension
Indicate whether the statement is true or false
A logical unit is designed to manage many physical units.
Answer the following statement true (T) or false (F)
Write a value-returning function called addOne that is passed an int data value and returns the value increased by one. Declare any local variables if needed.
What will be an ideal response?
If you use the Create new fill or adjustment layer button on the Layers panel, you will see three additional menu items: Solid Color, Gradient, and ____________________.
Fill in the blank(s) with the appropriate word(s).