What is the purpose of finalization?

What is the purpose of finalization?

- Finalization is the facility to invoke finalized() method.

- The purpose of finalization is to perform some action before the objects get cleaned up.

- This method performs the required cleanup before the garbage collection, which means the elimination of the 'orphan objects'.

- Its purpose is also to give an unreachable object a chance to perform any cleanup processing before the object is garbage collected.

- It is a process of preparing an object for deallocation.
Difference between the File and RandomAccessFile classes
Difference between the File and RandomAccessFile classes - The File class is used to perform the operations on files and directories of the file system of an operating......
Define class and object
Define class and object - Class: A class is a program construct which encapsulates data and operations on data. In object oriented.....
Explain class vs. instance with example using java
Explain class vs. instance with example using java - A class is a program construct which encapsulates data and operations on data......
Post your comment