Multiple Choice
Code Example Ch 06-1
In the following example, x is an int:
switch (x)
{
case 3 : x += 1;
case 4 : x += 2;
case 5 : x += 3;
case 6 : x++;
case 7 : x += 2;
case 8 : x--;
case 9 : x++
}
-Refer to Code Example Ch 06-1: If x is equal to 3, what will the value of x be after the switch statement executes?
A) 5
B) 6
C) 11
D) 10
E) 12
Correct Answer:

Verified
Correct Answer:
Verified
Q15: A loop can be used in a
Q16: In Java, it is possible to create
Q17: How many times will the following loop
Q18: The following loop is syntactically valid:<br>for(int j
Q19: Which of the following would rotate an
Q21: How can the following statement be rewritten
Q22: If a switch statement contains no break
Q23: Write a declaration that initializes an int
Q24: What does the break statement do?<br>A) It
Q25: Rewrite the following nested if-else statements using