Skip to content
Sharp

Engineering Interviews · interview question

Which approach is best for handling exceptions that occur in a multi-threaded Java application?

Multiple choiceMediumchapter-20-curatedpremiumengineering-interviewscode-review-spotting-bugs
Choose one answer
Answer and explanation

Correct answer

C. Using a try-catch block within each thread.

Why

Each thread should have its own try-catch block to handle exceptions. This ensures that exceptions are managed locally and do not affect other threads.

Test yourself on Engineering Interviews

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

Start free test
All Engineering Interviews questions →