- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between final, finally and finalize() in Java?
The final keyword can be used with class method and variable. A final class cannot be instantiated, a final method cannot be overridden and a final variable cannot be reassigned.
The finally keyword is used to create a block of code that follows a try block. A finally block of code always executes, whether or not an exception has occurred. Using a finally block allows you to run any cleanup-type statements that you just wish to execute, despite what happens within the protected code.
The finalize() method is used just before object is destroyed and can be called just prior to object creation.
- Related Articles
- Difference Between Final, Finally and Finalize in Java
- final, finally and finalize in Java
- final, finally and finalize in C#
- What is the difference between Finalize and Dispose in C#?
- Difference Between Static and Final in Java
- Difference Between dispose() and finalize() in C#
- Difference between constants and final variables in Java?
- What is the finally block in Java?
- What is the purpose of overriding a finalize() method in Java?
- What is the difference between Java and Core Java?
- What is the difference between Java and Java EE
- What is the difference between /* */ and /** */ comments in Java?
- What is the difference between >> and >>> operators in Java?
- What is final parameter in Java
- What is the difference between Java and JavaScript?

Advertisements