Multiple Choice
For the code segment below:
switch(q) {
Case 1:
System.out.println("apple") ;
Break;
Case 2:
System.out.println("orange") ;
Break;
Case 3:
System.out.println("banana") ;
Break;
Case 4:
System.out.println("pear") ;
Case 5:
System.out.println("grapes") ;
Default:
System.out.println("kiwi") ;
}
Which of the following values for q will result in kiwi being included in the output?
A) 2.
B) Any integer less than 1 and greater than or equal to 4.
C) 1.
D) 3.
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Which of the following will not help
Q2: Consider the classes below:<br> public class TestA
Q3: Consider the following two Java code segments:
Q5: Suppose variable gender contains MALE and age
Q6: Which statement prints the floating-point value 123.456
Q7: Which of the following statements about a
Q8: Which of the following can be used
Q9: Consider the code segment below.<br> if (gender
Q10: Which of the following for-loop headers results
Q11: Which case of the following would warrant