Skip to content
Sharp

Core Java · interview question

Which block is always executed in a try-catch-finally structure, regardless of whether an exception is thrown?

Multiple choiceEasychapter-6-curatedpremiumcore-javacode-reading-with-exceptions
Choose one answer
Answer and explanation

Correct answer

B. Finally

Why

The finally block is always executed after the try and catch blocks, regardless of whether an exception is thrown or caught. It is typically used for resource cleanup.

Test yourself on Core Java

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

Start free test
All Core Java questions →