After that code runs, the value of s will be " two ". No surprises.
But without the break statements:
The value of s will be " two three ". Keep looking at those two examples and be sure you can see the difference.
Well, sometimes. That's why some languages have fallthrough and some don't. Let's look at a situation where fallthrough becomes quite convenient.
|
|