What are the characteristics of Switch?
- Supports all kinds of data and checks for equality.
- When a case is matched, the program exits from the switch and does not continue to check.
- Switch statements must be exhaustive, and you must cover all possible values for the variable.
- No break is required because there is no fallthrough.
Suggest An Answer
No suggestions Available!