8
AssignmentMultiple Choice

Project: Using If and If-Else Statements and Reading User Input

Question 8 • ASC Programming, Games, Apps and Society

Examine the following switch-case statement. If Answer = 10 % 3, what result would be output? Switch (Answer) { case 1: System.out.println (“The answer is 1”); break; case 2: System.out.println (“The answer is 2”); break; case 3: System.out.println (“The answer is 3”); break; default: System.out.println (“The answer is not here”); break; }

Answer
A
The answer is not listed.
B
3
C
1
D
2
Previous
Next