Multiple Choice
Given the following two lines of code, what can be said about s1 and s2? String s1 = "testing" + "123";
String s2 = new String("testing 123") ;
A) s1 and s2 are both references to the same String object.
B) the line declaring s1 is legal in Java; the line declaring s2 will produce a syntax error.
C) s1 and s2 are references to different String objects.
D) s1 and s2 will compare "equal."
E) None of the above
Correct Answer:

Verified
Correct Answer:
Verified
Q36: Consider the condition (x == y). How
Q37: What is a wrapper class? Why are
Q38: In the StringMutation program shown in Listing
Q39: Which properties are true of String objects?<br>A)
Q40: What will be displayed by the following
Q42: In Java, the symbol "=" and the
Q43: The printf method within System.out is designed
Q44: If you need to import not only
Q45: Only difficult programming problems require a pseudocode
Q46: Java.text's NumberFormat class includes methods that<br>A) allow