What is the output of the following code:
```
public class Test {
public static void main(String[] args) {
String s1 = new String("Java");
String s2 = new String("Java");
System.out.print((s1 == s2) + " " + (s1.equals(s2)));
}
}```
a. false false
b. true true
c. false true
d. true false
c s1 == s2 is false, since s1 and s2 are two different objects. s1.equals(s2) is true since the equals method returns true if two strings have the same content.
You might also like to view...
Which type of wireless network uses the ATIM window?
A. BSS B. IBSS C. ESS D. WVLAN
An active cell can only be found in a Word table
Indicate whether the statement is true or false
If you need to revoke a certificate before its expiry date, you would use the Revoked certificates node of the Certification Authority snap-in
Indicate whether the statement is true or false
A bulkhead is a software program or hardware device that controls access between two networks.
Answer the following statement true (T) or false (F)