Table of Content 10
When to use Exception Handling?
If you want to catch the exception explicitly so that other statements from your application can be executed successfully, then you need to use exception handler in your program.
Problem occurred while executing the statement can be divided into two types:
- It is a type of problem that will not be handled and the execution of the application will be terminated.
- Depending on the reason, various classes are defined for various errors and all the error classes are subclasses of java.lang.Error class.
Handling Exception in program
- You can use try and catch blocks to handle the exception.