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
Q21: When writing output to a file, if
Q25: Given a decimal number, the method format
Q29: Suppose str is a String variable. The
Q36: The class JOptionPane is part of the
Q37: Which of the following is a valid
Q41: What is the output of the following
Q42: Which of the following is an area
Q44: Which of the following outputs 56734.9875 to
Q44: The showMessageDialog method has _ parameter(s).
A) one
B)
Q45: String sentence;
String str1, str2, str3, str4;
Int length1;sentence
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