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 str4?
A) 11
B) 12
C) 13
D) 14
Correct Answer:

Verified
Correct Answer:
Verified
Q2: Suppose z = 1834.762. The output of
Q7: The classes Integer, Float, and Double are
Q8: In a format specifier, the option width
Q11: Which statement instructs a program to run
Q16: In a string, the index (position) of
Q19: The dot (.) operator is also called
Q26: An expression such as str.length(); is an
Q29: Which of the following statements would store
Q35: What is the value of the following
Q41: If length denotes the length of a