Uttar Pradesh, India
Instagram
image

Default Exception Handler in Java

Default Exception Handler:

If the program's method doesn't have any exception handling code JVM provides Default Exception Handler to handle such kind of situation.If the exception raised inside any method that method is to be responsible for creation of Exception Object.At the end all the exception objects hands over to the Default Exception Handler this prints the Exception message to the console.Finally JVM terminates the program abnormally.

Exception Object:

"Exception object is the complete description of the exception inside any method."

Three important components of Exception Object are

1-Name
The name of the exception raised inside any method.

2-Description
The description of the exception raised inside any method.

3-Location
The location of the exception raised inside any method.
 

Fig.2
image

Fig.3
image

Fig.4
image


Comments

Share your thoughts in the comments

Your email address will not be published. Required fields are marked *