What is Exception Handling
Exception Handling is a mechanism to handle run time errors. We can handle exception with the help of exception object. The objective of exception handling is to maintain the normal flow of the program.We can understand the basic flow of exception handling through below diagram.
Java is very robust language so exception handling in Java is easy to understand and use. In Java whenever any exception occurs during executing a statement, it creates an object of exception class then the normal flow of the program break.
The exception object contains few information through which we can understand d the ebugging information like method hierarchy, line number where the exception occurred, type of exception etc.
When the exception occurs in a program it automatically throws exception to the runtime environment. Once JRE receives the exception object it called the block of code that can process on the exception object.