What are the Differences Between a Checked and Unchecked Exceptions in Java ?

Checked Exceptions extend Throwable class, but they do not extend RuntimeException or Error classes. UncheckedException extend RuntimeException class.

Checked Exceptions are checked at compile time in Java. Unchecked Exceptions happen at Runtime, so they are not checked at compile time.

IOException, SQLException etc. are examples of Checked Exceptions. NullPointerException, ArithmeticException etc. are examples of Unchecked Exceptions.



You May Interest

How Can Be Read Data From a Form in a JSP ?

How Strategy Design Pattern is Different From State Design Patter ...

How Will You Handle InterruptedException in Java ?

Why Did Oracle Release a New Version of Java Like Java 8 ?

What is the Main Difference Between a Session and Cookie in JSP ?