Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is the value of str after the following code has been executed? String str;

ID: 3573411 • Letter: W

Question

What is the value of str after the following code has been executed? String str; Str sourceStr = "Hey diddle, diddle, the cat and the fiddle"; str = sourceStr.substring(12, 17);, did diddl Iddle diddle "smiles", substring(1, 5) returns "mile". true false If str is declared as: String str = "ABCDEFGHI"; What will be returned from Character.toLowerCase (str.CharAt(5))? F e f E The statement is used to make simple decisions in Java. Branch for do/while if A Boolean expression is one that is either: x or y Positive or negative true or false None of the above Which of the following expressions will determine whether x is less than or equal to y? x >= y x = y x y) x = x - y; 135 75 15 60 This is a control structure that causes a statement or group of statements to repeat. Body Prefix mode Loop Block The increment operator is: - -= ++ *= This type of loop is ideal in situations where the exact number of iterations is known. do-while loop for loop if statement while loop The switch statement is a: Sequence structure Multiple alternative decision structure Nested decision structure Test expression

Explanation / Answer

22. What is the value of str after executing this code:
String str;
String sourceStr = "Hey diddle, diddle, the cat and the fiddle";
str = sourceStr.substring(12, 17);
B. diddl is the output.

23. "smiles".substring(1, 5) returns "mile".
A. true.

24. If str is declared as:
String str = "ABCDEFGHI";
Character.toLowerCase(str.charAt(5)) returns:
C. f.

25. ___ statement is used to make simple decisions in Java.
D. if.

26. A Boolean expression is one that is either.
C. true of false.

27. Which of the following determine whether x is less than or equal to y?
D. x <= y

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote