- The switch expression must be of an integer type, such as char, byte, short, or int, or of type string .
- The default statement sequence is executed if no case constant matches the expression.
- The default is optional.
- If default is not present, no action takes place if all matches fail.
- When a match is found, the statements associated with that case are executed until the break is encountered.
|