Notes on Exceptions Exceptions are used for handling exceptional conditions such as errors. The concept of exceptions is not well supported in most other languages. Exceptions remove error handling from the mainline code. It relieves the programmer from the need to check the return status of every method call.
Exception handling is slow compared to other processing.
If you use a method that can throw and exception, you must specify in your program how that exception should be handled. The Throwable class, parent of all Exceptions, has some useful methods. The parent class of all other exceptions. ArithmeticException Thrown when an exceptional arithmetic condition has occurred. EmptyStackException Thrown by methods in the Stack class to indicate that the stack is empty.