Day 2 - Differences between checked & unchecked exceptions in java!

sanjaybabu

C K Sanjay Babu

Posted on May 2, 2022

Day 2 - Differences between checked & unchecked exceptions in java!

Checked Exceptions

These are checked during compile time itself. Checked Exceptions should be either handled or the same should be notified with the throws keyword.

Example - SQLException, IOException.

Unchecked Exceptions

These exceptions are checked during runtime. The classes that inherit the RuntimeException fall under unchecked exceptions. It's not necessary to handle these exceptions.

Example - NullPointerException, ArrayIndexOutOfBoundsException.

💖 💪 🙅 🚩
sanjaybabu
C K Sanjay Babu

Posted on May 2, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related