Multiple Choice
String sentence;
String str1, str2, str3, str4;
Int length1;sentence = "First exam is on Monday.";str1 = sentence.substring(6, 12) ;
Str2 = str1.substring(0, 4) ;
Str3 = sentence.replace('i', '#') ;
Str4 = sentence.indexOf("on") ;length1 = sentence.length() ;Based on the code above, what is the value of str2?
A) Firs
B) First
C) Monda
D) exam
Correct Answer:

Verified
Correct Answer:
Verified
Q10: In the class String, the substring method
Q13: Which of the following outputs 56734.9875 to
Q14: String sentence;<br>String str1, str2, str3, str4;<br>Int length1;sentence
Q19: Suppose the String variable str points to
Q22: There are _ type(s) of methods in
Q24: Given int num; the value of num
Q33: Reference type variables directly store data into
Q39: The new operator is used to create
Q43: The default output of decimal numbers of
Q47: String objects are mutable.