What is the difference between a `checked` and `unchecked` exception in Java?

Java Associate Medium

Java Associate — Medium

What is the difference between a `checked` and `unchecked` exception in Java?

Key points

  • Checked exceptions require handling at compile time
  • Unchecked exceptions extend RuntimeException
  • Unchecked exceptions do not need to be declared or caught at compile time

Ready to go further?

Related questions