Interview Question
Qus: What is the use of a finally block in exception handling?
You can use a finally block if you want to clean up any resources that are allocated in a try block, and you can run code even if an exception occurs in the try block.
Answers (2)