What is the importance of finally block in exception handling ?5
1081 5b5cc7cee4d2b419777510fe
Q: What is the importance of finally block in exception handling ?
- Show Answer
- Workspace
- Discuss
Answer :
Explanation :
A finally block will always be executed, whether or not an exception is actually thrown. Even in the case where the catch statement is missing and an exception is thrown, the finally block will still be executed. Last thing to mention is that the finally block is used to release resources like I/O buffers, database connections, etc.
Similar Questions
Since Nithya and Suganya exchange places, so Rita’s new position is the same as Monika’s earlier position. This position is 17th from the right and 10th from the left. Therefore Number of girls in the row = (16 + 1 + 9) = 26.