The rule is, once your test selects one of the cases, all subsequent cases will also execute unless told otherwise.
The "break" statement is a direction to leave the switch statement at that point. Go no further in the switch.
To many people, the surprising thing about switch fallthough is that (without break) the subsequent cases execute even though the case isn't satisfied.
|
|