posted 24 years ago
The statement "catch (ExceptionType)" will catch all exceptions of the type ExceptionType and all exceptions that can be CAST to ExceptionType. Hence, since Exception is the super class of all exceptions, IllegalArgumentException, and in fact all other exceptions, can be caught by the statement catch(Exception).
Note that the Runtime Environment steps through the defined catch's in the order that they are written in the code executes the first acceptable catch. hence, in your code, after all the catch's already present, if you were to add another one for IllegalArgumentException, that handler would never be executed even of an IllegalArgumentException were thrown since, when the Runtime reaches catch(Exception), it would run that handler and consider the IllegalArgumentException as handled.
May the Moose be with you.