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.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 have the same contents
b. s1 and s2 have different contents

a

Computer Science & Information Technology

You might also like to view...

What is the default authentication method according to the 802.11 standard?

A. basic B. open system C. shared key D. private key

Computer Science & Information Technology

When you write a loop, you must control the number of repetitions it performs; if you do not, you run the risk of creating a(n) ____ loop.

A. updating B. eternal C. infinite D. long

Computer Science & Information Technology