The compiler can determine in the case of throw e, that it can only be a checked exception of type NumberFormatException which is already declared in the throws clause.
In the latter case you're trying to throw the checked Exception which needs to be declared in the throws clause or caught.