Skip to content
Sharp

Exceptions · interview question

How would you explain a key difference between checked and unchecked exceptions in a Java interview?

Multiple choiceHardchapter-6-curatedpremiumexceptionsexceptions-basics
Choose one answer
Answer and explanation

Correct answer

C. Checked exceptions must be declared or handled; unchecked exceptions do not.

Why

Checked exceptions are enforced by the compiler to be either caught or declared in the method signature, ensuring that the programmer is aware of and handles them. Unchecked exceptions, however, do not have this requirement and typically indicate programming errors.

Test yourself on Exceptions

A free test with instant, explained results. No account needed.

Start free test
All Exceptions questions →