The Two-Minute Drill at the end of Chapter 6 (page 361) contains the following statement:
"The
default block can be located anywhere in the
switch block, so if no preceding
case matches, the
default block will be entered, ..."
I suggest that the word "preceding" is not quite correct; if no
other case matches, the
default block will be entered.
Ref:
http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html "If no
case matches but there is a
default label, then all statements after the matching
default label in the
switch block, if any, are executed in sequence." Note that it says "no
case", not "no
preceding case".
In years of coding (mostly C/C++), I don't think I've ever seen a default block anywhere but at the end of the switch statement; so the word "preceding" will almost always be correct. But I was worried when I saw this in the book, because I thought it was just the kind of thing the OCA exam might try to use to trip up a hapless candidate.
Don