Exception handling
}Exception—an indication of a problem that occurs during a program’s execution.
§The name “exception” implies that the problem occurs infrequently.
}With exception handling, a program can continue executing (rather than terminating)after dealing with a problem.
§Mission-criticalor business-critical computing.
§Robust and fault-tolerant programs (i.e., programs that can deal with problems as they arise and continue executing).
}ArrayIndexOutOfBoundsException occurs when an attempt is made to access an element past either end of an array.
}ClassCastException occurs when an attempt is made to castan object that does not have an is-a relationship with the type specified in the cast operator.
}A NullPointerException occurs when a null reference is used where an object is expected.
}Only classes that extend Throwable (package java.lang) directly or indirectly can be used with exception handling.
.

