Exception handling tutorial Java

Exception:

Exception refers to an exceptional event. Exception is an event that disrupts the normal flow of the program, during program execution.

Exception object:

When an error occurs within a method, the method creates an object and hands it to the runtime system. This object is known as exception object. It contains the information of the error.

Throwing an exception:

It is a process of handing an exception object to the runtime system.

Catch the exception:

It is a process of finding something which can handle exception object.

Exception handler:

It is a block of code that can handle the exception is known as exception handler.

Java exception handling tutorial:

Interview Questions on Exception Handling

 

Content Protection by DMCA.com
Please Share