Exception Handling in Java
→ Handled the exception using try-catch' block where try block contains the code which is under observation for exceptions. annd catch block contains the remedy for the exception.If any error or exception occurs in the try block then the control jumps to catch block.
→ Exception Handling is mechanism to Handle runtime error.
→ Exception is an object or event that is thrown at runtime
→ An exception can occur due to many different reasons, some of them are:
Advantage of Exception Handling
→ Advantage of Exception Handling to maintain the flow of the application is the given in scenario.
Hierarchy of Java Exception classes
Exception Handling Keywords in Java