Question: What is the purpose of the finally block?

  1. To always run the finally block of code when the try block exits
  2. To run code when an exception has not occurred
  3. To run the block if an exception occurred
  4. To run code whenever garbage collection requires it

Answer: The correct answer of the above question is Option A:To always run the finally block of code when the try block exits