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 str1?
A) exam i
B) exam
C) exam is
D) on Monday
Correct Answer:
Verified
Q21: When writing output to a file, if
Q25: Given a decimal number, the method format
Q29: There are _ type(s) of methods in
Q29: Suppose str is a String variable. The
Q30: Which of the following is the member
Q32: The statement System.exit(0); is found at the
Q33: String sentence;
String str1, str2, str3, str4;
Int length1;sentence
Q33: Which statement instructs a program to run
Q36: The class JOptionPane is part of the
Q37: Which of the following is a valid
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents