4. What is Exception?
Definition of Exception Handling?
Why this occur in program?
Why we use Exception Handling?
Its Benefits?
Catching Exceptions.
Syntax
Example
4
6. Exception Handling is a mechanism to handle
runtime errors such as ClassNotFound, IO,
SQL, etc.
An exception is a problem that arises during
the execution of a program.
6
7. A user has entered invalid data.
A file that needs to be opened cannot be
found.
Abnormal termination of program.
Some exceptions occurs by physical resources
that have failed in some manner (system
dependent events).
7
8. Exception Handling normally use to avoid
disrupts (Break up) the normal flow of the
application that is why we use exception
handling.
8
9. The core advantage of exception handling is
to maintain the normal flow of the
application.
9
10. A method catches an exception using a
combination of the try and catch keywords.
A try/catch block is placed around the code
that might generate an exception.
Code within a try/catch block is referred to
as protected code.
10