Problem Statement
What is the purpose of the finally clause in exception handling?
Explanation
The finally block follows try and catch blocks and is guaranteed to execute whether an exception is thrown or handled. It is typically used to release resources like file handles or close database connections, ensuring no resource leak.