---
title: "What is the purpose of finalization in java?"  
description: "What is the purpose of finalization in java?"  
author: "Sumit Kesarwani"  
published: 2014-03-26  
updated: 2020-09-15  
canonical: https://www.mindstick.com/interview/1942/what-is-the-purpose-of-finalization-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is the purpose of finalization in java?

The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.

## Answers

### Answer by Sumit Kesarwani

The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.


---

Original Source: https://www.mindstick.com/interview/1942/what-is-the-purpose-of-finalization-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
