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
Answer: A
You might also like to view...
Analyze the following code:
``` Code 1: int number = 45; boolean even; if (number % 2 == 0) even = true; else even = false; Code 2: int number = 45; boolean even = (number % 2 == 0); ``` a. Code 1 has compile errors. b. Code 2 has compile errors. c. Both Code 1 and Code 2 have compile errors. d. Both Code 1 and Code 2 are correct, but Code 2 is better.
There are no default tab stops in Word 2010
Indicate whether the statement is true or false
Filters can be applied to more than one column in a table
Indicate whether the statement is true or false.
What is a piece of malicious software that gets passed from computer to computer by attaching itself to a program?
A. Spyware B. Trojan C. Virus D. Worm