Error Processing and Exceptions in Java Programming
Previous | Home | Next |
The approach used by Java to catch and handle exceptions is to surround blocks of statements for which exception processing is to be performed with a try statement. The try statement contains a catch clause that identifies what processing is to be performed for different types of exceptions.
When an exception occurs, the Java Runtime system matches the exception to the appropriate catch clause. The catch clause then handles the exception in an appropriate manner.
Previous | Home | Next |