Skip to main content

Explain Java exception hierarchy.

Junior Java
Quick Answer Exception hierarchy: Throwable at top. Two branches: Error (serious system problems - OutOfMemoryError, StackOverflowError - don't try to catch these) and Exception. Exception branches into: checked exceptions (must handle - IOException, SQLException) and unchecked/RuntimeException (NullPointerException, IllegalArgumentException, ArrayIndexOutOfBoundsException). RuntimeExceptions typically indicate programming bugs.

Answer

Throwable ? Error and Exception.
Error: Serious issues (not handled usually).
Exception: Can be handled.
Checked exceptions must be declared; unchecked are runtime exceptions.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice