---
title: "What is difference between final, finally and finalize?"  
description: "What is difference between final, finally and finalize?"  
author: "Anonymous User"  
published: 2015-04-29  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/2456/what-is-difference-between-final-finally-and-finalize  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is difference between final, finally and finalize?

| ## \ **final:** final is a keyword, final can be variable, method or class.You, can't change the value of final variable, can't override a final method, can't inherit final class. |
| --- |
| **finally:** finally block is used in exception handling. finally block is always executed. |
| **finalize():** finalize() method is used in garbage collection.finalize() method is invoked just before the object is garbage collected.The finalize() method can be used to perform any cleanup processing. |

## Answers

### Answer by Anonymous User

| ## \ **final:** final is a keyword, final can be variable, method or class.You, can't change the value of final variable, can't override a final method, can't inherit final class. |
| --- |
| **finally:** finally block is used in exception handling. finally block is always executed. |
| **finalize():** finalize() method is used in garbage collection.finalize() method is invoked just before the object is garbage collected.The finalize() method can be used to perform any cleanup processing. |


---

Original Source: https://www.mindstick.com/interview/2456/what-is-difference-between-final-finally-and-finalize

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
