Multiple Choice
Consider the following two lines of code. What can you say 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 s2 is legal Java; the line declaring s1 will produce a syntax error
C) s1 and s2 are both references to different String objects
D) s1 and s2 will compare "equal"
E) none of the above
Correct Answer:

Verified
Correct Answer:
Verified
Q23: Rewrite the following five assignment statements into
Q29: The advantage(s) of the Random class' pseudo-random
Q30: If two variables contain aliases of the
Q31: Which of the following will yield a
Q32: The Swing package<br>A) completely replaces the AWT<br>B)
Q35: Layout managers are associated with<br>A) objects<br>B) interfaces<br>C)
Q36: If you need to import not only
Q37: Given the following code fragment String strA
Q38: In Java, the symbol "=" and the
Q43: The printf method within System.out is designed