Here are some top java exception handling interview question:

1) Explain an exception?

The logical errors are represented by the objects called as exceptions that occur during run time and happens during run time and it enters into the ambiguity state.

JVM creates the objects automatically for representing these run time errors called as Exceptions.

2) Explain the difference between an error and an exception?


Serious problems are indicated by an error called subclass of throwable that is a reasonable application must not try to catch.

A subclass of Throwable is called an error that shows the serious problems of a reasonable application must not try to catch. There are lots of errors with strange conditions.

3) Explain the way exceptions are handled in Java?

With the help of try catch blocks, exceptions can be handled.

For generating the exceptions, the statements need to have try block because when there is an exception shown in a try block it will be assigned with the next exception class object in catch block.

4) Explain the super class of Error and Exception


Throwable.

5.Exceptions are defined in which java package

java.lang.Exception

6.Explain throw keyword in java?

An exception is thrown manually with the help of throw keyword.

For suspending the execution, whenever needed the functionality relies on the user-defined logical condition for throwing the keyword to throw the exception..read more