Multiple choice

Which of the following is/are true statements about finally block in java?

  1. By using a finally block allows you to run any cleanup-type statements .

  2. A finally keyword is used to create a block of code that follows a try block.

  3. A finally block appears at the end of the catch blocks.

  4. All of the above

  5. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Yes, all are the true statement about the finally block.