Checked Exception vs Unchecked Exception

Checked Exception

The exception which is checked by the compiler for the normal execution of a Java program is known as a checked exception. In our program there is a chance of raising a checked exception then we must handle that checked exception either by using try-catch or throws keywords otherwise we will get compile time error.

Unchecked Exception

The Exceptions which are not checked by the compiler whether the programmer handles that exception or not such type of exceptions are known as unchecked exceptions.

Note

  1. Every exception occurs at runtime whether it is a checked exception or unchecked exception.

Similar Java Tutorials

3 thoughts on “Checked Exception vs Unchecked Exception”

Leave a Comment