Skip to content
Sharp

Core Java · interview question

What happens when a checked exception is not declared or handled in Java?

Multiple choiceMediumchapter-6-curatedpremiumcore-javathrow-throws-and-propagation
Choose one answer
Answer and explanation

Correct answer

C. The code will not compile.

Why

Checked exceptions must be either declared in the method signature or handled with a try-catch block. Failing to do so results in a compilation error.

Test yourself on Core Java

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

Start free test
All Core Java questions →