Examlex

Solved

For the Code Segment Below

question 4

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?


Definitions:

Related Questions