Skip to content
Sharp

Core Java · interview question

In an order-processing system, which design consideration justifies creating a custom exception?

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

Correct answer

D. To provide more specific context about an error condition.

Why

Creating a custom exception allows for conveying specific information relevant to the application domain, which can improve error handling and debugging in complex systems.

Test yourself on Core Java

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

Start free test
All Core Java questions →