No. Nothing you put after System.exit is reachable. But the type checker doesn't know that, it requires either a return statement of something of the correct type, or a throw.