PRACTICE / UNDERSTAND / REPEAT

Java: Exceptions

Practice exceptions with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

17 questionsAnswers explainedFree · no login
Question 1 of 17
Exceptions · MCQQuestion link ↗

Which block runs whether or not a `try` block throws?

Choose one answer
Answer & explanation

Answer: finally

`finally` normally runs after `try`/`catch`, making it useful for cleanup.