|
- Exception is an error event that can happen during the execution of a program and disrupts its normal flow.
-
Exception can arise from different kind of situations such as wrong data entered by user, hardware failure, network connection failure etc.
-
Whenever any error occurs while executing a java statement an exception object is created and then JRE tries to find exception object is passed to the handler code to process the exception, known as catching the exception.
-
If no handler is found then application throws the exception to runtime environment and JRE terminates the program.
- Java Exception handling framework is used to handle runtime errors only, compile time errors are not handled by exception handling framework.
|