Multiple Choice
Consider the String below:
String r = "a toyota";
Which of the following will create the String r1 = "a TOYOTa"?
A) String r1 = r.replace("toyot", TOYOT") ;
B) String r1 = r.replace('t','T') ;
r1 = r.replace('o','0') ;
r1 = r.replace('y','Y') ;
C) String r1 = r.replace('t','T') .replace('o', '0') .replace('y', 'Y') ;
D) String r1 = r.substring(2, 4) .toUpperCase() ;
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)
Q21: How many String objects are instantiated by
Q22: Consider the Java segment: <br>String line1 =
Q23: Which of the following creates the string
Q25: Which of the following will create a
Q26: String objects are immutable. This means they