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.
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.