Question: String sentence; String str 1 , str 2 , str 3 ; int length 1 ; sentence = First exam is on Monday.; str 1

String sentence;
String str1, str2, str3;
int length1;
sentence = "First exam is on Monday.";
str1= sentence.substring(6,12);
str2= str1.substring(0,4);
str3= sentence.replace('i','#');
length1= sentence.length();
Based on the code above, what is the value of length1?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!