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

Does Java Allow Virtual Functions ?

What is the Difference Between an Iterator and ListIterator in Ja ...

What is the Advantage of Using Unicode Characters in Java ?

What is the Purpose of Native Method in Java ?

What are the Rules of Method Overloading and Method Overriding in ...