posted 19 years ago
Either approach is fine except that if you place an exception in the throws clause of the method, then any method that calls it must also take care of the exception.
Of course this is provided the method is not inherited from a superclass or superinterface. In that case, you are only allowed to list subclasses of the exceptions listed in the superclass or superinterface. In that case you either have to use a try-catch block or wrap a checked exception in an unchecked exception and throw it.