A
Java compiler must carry out a conservative flow analysis to make sure all statements are reachable. This analysis takes into account the structure of statements.
A method invocation can completely normally. Therefore, a statement following a method invocation statement is reachable.
A throw statement cannot completely normally. Therefore, a statement following a throw statement is unreachable.
When you and I look at the method throwit, we think - well, that method will never complete normally. It is not one of the rules (JLS 14.20 Unreachable Statements) for the compiler to analyze the method.
[ July 15, 2003: Message edited by: Marlene Miller ]