Skip to content
Sharp

Exceptions · interview question

In Java, what is the result of not handling a checked exception?

Multiple choiceEasychapter-6-curatedpremiumexceptionscustom-exceptions
Choose one answer
Answer and explanation

Correct answer

D. The program will not compile

Why

Checked exceptions must either be caught in a try-catch block or declared in the method signature with the 'throws' keyword. Failing to do so will result in a compilation error.

Test yourself on Exceptions

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

Start free test
All Exceptions questions →