Why there isn't a "break"?
My book is a Chinese version.
In page 82(Chapter III), it says, when we use the "switch" sentence, we always should add the "break" when we finish one case, just like "TrySwitch.java".
But in page 238(Chapter VI), when the author talks about the enumeration in class, there are many programs, such like TryEnumeration.java, JacketSize.java. But in JacketSize, it used the "switch" sentence, but it doesn't add the "break", and it runs correctly. Why is it?
|