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 = new String("Welcome to Java!");
if (s1 == s2)
System.out.println("s1 and s2 reference to the same String object");
else
System.out.println("s1 and s2 reference to different String objects");
}
}
```
a. s1 and s2 reference to the same String object
b. s1 and s2 reference to different String objects
b. s1 and s2 reference to different String objects
You might also like to view...
Why was the free derivative of Secure Shell (SSH) created?
What will be an ideal response?
A ________ chart shows trends over time
A) bar B) line C) pie D) scatter
?A _____ includes a review of a project's scope, stakeholders, budget, schedule, and any other internal or external factors that might affect the project.
A. ?change management plan B. ?configuration management plan C. ?debt management plan D. ?risk management plan
COGNITIVE ASSESSMENT Which of the following best describes the function of a primary key?
A. The first record in a data file B. Another term for file name C. To uniquely identify each record in a file D. To provide decryption of data