Multiple Choice
How many String objects are instantiated by the following code segment (not including the literals) ?
String s1, output;
S1 = "hello";
Output = "\nThe string reversed is: " ;
For (int i = s1.length() - 1; i >= 0; i--)
Output += s1.charAt(i) + " " ;
A) 1.
B) 4.
C) 5.
D) 7.
Correct Answer:

Verified
Correct Answer:
Verified
Q16: To find the character at a certain
Q17: StringBuilder objects can be used in place
Q18: Given the following declarations: <br>StringBuilder buffer =
Q19: Which of the following is not a
Q20: Which of the following statements is true?<br>A)
Q22: Consider the Java segment: <br>String line1 =
Q23: Which of the following creates the string
Q24: Consider the String below: <br>String r =
Q25: Which of the following will create a
Q26: String objects are immutable. This means they