Need Assistance?

support@tutorialshub.in

Exception Handling in Java

Checked vs Unchecked Exceptions Hierarchy

ADVERTISEMENT
Java Free Lesson
5 min read
ADVERTISEMENT

All errors and exceptions inherit from Throwable:

  • Checked Exceptions (e.g., IOException, SQLException): Checked at compile time—you must handle them with try-catch or declare throws.
  • Unchecked Exceptions (subclasses of RuntimeException like NullPointerException, ArithmeticException): Occur at runtime due to logic bugs.
  • Errors (OutOfMemoryError, StackOverflowError): Serious JVM failures your app shouldn't try to catch.
ADVERTISEMENT
Hi, I'm Tuby! Here to help you