Question: Question 1 [3 MARKS] 1.1 Consider the code fragment: String sentence, strl, str2, str 3; int lenl, len2; sentence = Today is Wednesday.; stri -
![Question 1 [3 MARKS] 1.1 Consider the code fragment: String sentence,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f390cf48a1b_35066f390cebf9fe.jpg)
Question 1 [3 MARKS] 1.1 Consider the code fragment: String sentence, strl, str2, str 3; int lenl, len2; sentence = "Today is Wednesday."; stri - sentence.substring(8, 18); str2 = strl.substring(1,9); str3 = str2.replace('d','S'); What is the value of str3? 1.2 Consider the code fragment: int x - 3, y = 0; if (x > 5) y = 1; else if (x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
