Multiple Choice
Which of the following statements will create a reference, str, to the string, "Hello, world"?
(1) String str = new String("Hello, world") ;
(2) String str = "Hello, world";
A) 1
B) 2
C) 1 and 2
D) neither 1 or 2
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q8: Instance methods do not have this key
Q9: A constructor is a method that:<br>A) returns
Q10: One or more objects may be created
Q11: Which of the following is NOT involved
Q12: What does the following UML diagram entry
Q14: Given the following code, what will be
Q16: Class objects normally have _ that perform
Q17: You should not define a class field
Q18: Which of the following are classes from
Q48: Instance methods do not have the key