Explain the term in relation to SWITCH: Default
Advertisements
Question
Explain the term in relation to SWITCH:
Default
Explain
Advertisements
Solution
In Java, the default label is used within a switch statement to specify a block of statements that is executed when none of the case labels match the value of the switch expression. The default block is optional and is generally used to handle unmatched values.
shaalaa.com
Is there an error in this question or solution?
