Skip to content
Sharp

Exceptions · interview question

In which scenario should you convert a checked exception to an unchecked one?

Multiple choiceHardchapter-6-curatedpremiumexceptionschecked-vs-unchecked-exceptions
Choose one answer
Answer and explanation

Correct answer

C. When the caller cannot reasonably recover from the exception.

Why

If an exception is thrown in situations where the caller cannot meaningfully address it, converting it to an unchecked exception might be appropriate. This signals that it's a programming error or a condition that the application cannot recover from.

Test yourself on Exceptions

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

Start free test
All Exceptions questions →