Question: String sentence; String str1, str2, str3, str4; int length1; sentence = First test is on Monday.; str1 = sentence.substring(6, 12); str2 = str1.substring(0, 4); str3
String sentence; String str1, str2, str3, str4; int length1; sentence = "First test 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?
options:
| 11 | |
| 12 | |
| 13 | |
| 14 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
