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
Q3: Consider the Java segment: <br>String line1 =
Q5: Which of the following are static Character
Q10: Consider the statement below:<br>StringBuilder sb1 = new
Q14: The String method substring returns _.<br>A)a char<br>B)a
Q16: Which of the following will create a
Q19: Which of the following is not a
Q20: Which of the following statements is true?<br>A)
Q20: The statement<br>S1)equalsIgnoreCase(s4)<br>Is equivalent to which of the
Q22: Consider the Java segment: <br>String line1 =
Q26: String objects are immutable. This means they