Examlex

Solved

String Sentence; String Str1, Str2, Str3, Str4;

question 18

Multiple Choice

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?


Definitions:

Continental Crust

The substantial section of the Earth's crust that creates the major continental areas, typically older and more intricate than the crust found beneath oceans.

Oceanic Crust

The thin layer of crust that forms the ocean floors, primarily composed of basalt and gabbro, and denser than continental crust.

Uppermost Mantle

The top layer of the Earth's mantle, directly beneath the Earth's crust, involved in tectonic plate movements and magma generation.

Isostasy

The condition of equilibrium, comparable to floating, of the crust resting on the solid mantle.

Related Questions