Common Checked Exceptions in Java
Fast recall
Quick revision
Core answer
FileNotFoundException), `SQLException` (JDBC), `InterruptedException` (thread interruption), `ClassNotFoundException` (reflection/class loading), and `ParseException`. They all extend Exception (not RuntimeException), so the compiler forces you to catch or declare them — their APIs require callers to acknowledge the failure at compile time.Whether you can name real checked exceptions and recognise the pattern (external/environmental failures)
Listing RuntimeExceptions (like NullPointerException) as checked, or not knowing InterruptedException is checked
Point out the common thread: they all represent things outside your code's control where recovery is plausible
Interview-ready guide
Interview answer
Common checked exceptions include IOException for file or stream operations, SQLException in JDBC, InterruptedException from interruptible blocking methods, ClassNotFoundException from dynamic class loading, and ParseException from APIs that use that older parsing contract.
For example, Files.readString(path) declares IOException, so the caller must catch it or declare it. Thread.sleep(...) declares InterruptedException; a caller may propagate it, or if it must catch it, follow the task's interruption policy and often restore the interrupt status. These types are grouped because of Java's catch-or-declare rule. They do not all have the same cause or the same recovery action.
Common Checked Exceptions in Java
Direct Answer
The most common checked exceptions are IOException (and subtypes like FileNotFoundException), SQLException (JDBC), InterruptedException (thread interruption), ClassNotFoundException (reflection/class loading), and ParseException. They all extend Exception (not RuntimeException), so the compiler forces you to catch or declare them — their APIs require callers to acknowledge the failure at compile time.
Deep Dive & Architecture
IOException is the base for many file and stream failures, including FileNotFoundException. SQLException reports database-access failures and can carry SQL state and a vendor code. InterruptedException tells blocking code that another thread requested interruption; handling it is part of a cancellation policy. ClassNotFoundException is used when code asks for a class by name and the loader cannot find it. ParseException belongs to APIs such as SimpleDateFormat that report checked parsing failure.
The shared fact is structural: each is under Exception but outside RuntimeException, so catch-or-declare applies. Do not invent one universal response such as retrying. A missing file might use a default, a database failure might be translated, interruption may stop a task, and a bad import file may be reported to the user.
Code Example
// IOException (checked) -- reading a file
String cfg = Files.readString(Path.of("app.conf")); // throws IOException
// SQLException (checked) -- JDBC
try (Connection c = ds.getConnection()) { /* ... */ } // throws SQLException
// InterruptedException (checked) -- blocking call
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt(); // restore the interrupt flag
}
// ClassNotFoundException (checked) -- reflection
Class<?> c = Class.forName("com.example.Plugin"); // throws ClassNotFoundException
All five are checked because they model conditions outside your code where recovery makes sense.
Common Mistakes & Pitfalls
- Calling
NullPointerException/IllegalArgumentExceptionchecked — they're unchecked (RuntimeException). - Not knowing
InterruptedExceptionis checked — and forgetting to restore the interrupt flag. - Swallowing
SQLExceptionwith an empty catch instead of rolling back/logging. - Assuming all I/O is one type —
FileNotFoundExceptionis a specificIOExceptionsubtype.
Check your understanding
Answer these without looking back at the article.
- What happens at compile time if you don't handle a checked exception?
- How do you wrap a checked exception in an unchecked exception?
- Why is InterruptedException a checked exception?
Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.