Skip to content
Sharp

Core Java · interview question

In a checkout process, which type of exception should be used for a missing payment method?

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

Correct answer

C. CustomCheckedException

Why

A CustomCheckedException is appropriate for business logic errors like a missing payment method. It forces the caller to handle the exception explicitly, ensuring the issue is addressed.

Test yourself on Core Java

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

Start free test
All Core Java questions →