Skip to content
Sharp

Exceptions · interview question

When should a method catch an exception and take no further action?

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

Correct answer

C. When the exception is expected and harmless

Why

A method might catch an exception and take no further action if the exception is expected and does not affect the program's execution, such as an optional operation failing where the failure has no significant impact.

Test yourself on Exceptions

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

Start free test
All Exceptions questions →