What is the default case in a "switch" statement used for?
A. Handling the case with value 0
B. Providing a default value for a variable
C. Terminating the switch statement
D. Handling cases where none of the specified cases match
Answer: Option D
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