---
title: "What is the importance of finally block in exception handling ?"  
description: "What is the importance of finally block in exception handling ?"  
author: "Anonymous User"  
published: 2015-01-14  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/2266/what-is-the-importance-of-finally-block-in-exception-handling  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is the importance of finally block in exception handling ?

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.

## Answers

### Answer by Anonymous User

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.


---

Original Source: https://www.mindstick.com/interview/2266/what-is-the-importance-of-finally-block-in-exception-handling

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
