What is Exception ?

What is Exception ?

An Exception is an abnormal condition that may occur during the program execution.

 Exception is a class drived from the Throwable class. 

Two types of exception are there:Checked exception and Unchecked exception. If a checked exception is thrown by a method it must declare it or handle it by providing a try/catch block. 

Java provides the five keywords for handling the exception: try,catch,throw,throws and finally.When an exception is thrown,the class Exception or its subclassmust be instantiated and passed to the catch block as a parameter.


By:Jalees
Date:2011-01-09 00:00:00

An Exception is an abnormal condition that may occur during the program execution.

 Exception is a class drived from the Throwable class. 

Two types of exception are there:Checked exception and Unchecked exception. If a checked exception is thrown by a method it must declare it or handle it by providing a try/catch block. 

Java provides the five keywords for handling the exception: try,catch,throw,throws and finally.When an exception is thrown,the class Exception or its subclassmust be instantiated and passed to the catch block as a parameter.


By:Sumit Tripathi
Date:2018-05-15 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher