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

What is Difference Between Include Directive and Include Action o ...

What are the Atomic Operations in Java ?

How Will You Define the Scope of a Bean in Spring ?

Why ListIterator Has add Method But Iterator Does Not Have in Jav ...

How Will You Implement Error Page in JSP ?