Skip to main content
Source Link
TylerH
  • 21.3k
  • 84
  • 84
  • 121

From the JLS:

In the judgment of the designers of the Java programming language, [throwing a NullPointerException if the expression evaluates to null at runtime] is a better outcome than silently skipping the entire switch statement or choosing to execute the statements (if any) after the default label (if any).

- gparyani   Aug 15, 2013 at 23:37

Post Made Community Wiki by TylerH