In Java, what does the "default" case in a "switch" statement do?
A. Indicates the end of the switch statement
B. Repeats the switch statement
C. Provides a block of code to execute when none of the cases match
D. Throws an exception
Answer: Option C
Related Questions on Flow Control
What is the purpose of the "if" statement in Java?
A. To execute a block of code conditionally
B. To create loops
C. To declare variables
D. To define methods
A. No output
B. Error
C. Hello
D. 5
Join The Discussion