Objectives:
|
Students will:
- create conditions in a program that will lead to exceptions
- create an exception handler to elegantly handle the
exception
|
Background:
|
Exceptions are conditions in a program that lead to a run time
error. The default exception handler processes the exception and
produces documentation of where the exception occurred and the
exceptional condition. Now, you will work with catching an exception
and handling it using Java's try/catch structure. |
New Terms:
|
try catch block - A Java structure that "tries" to execute a block
of code and "catches" and handles exceptions if they arise. |
Materials:
|
Except.java |
Acknowledgment: |
Elizabeth Adams and Nancy Harris |