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.
|