Significance of Finalize method

Significance of Finalize method.

- The Finalize method of an object is called when GC(Garbage Collector) is about to cleanup the object.

- We can keep cleanup code in the finalize block.

- It is the last chance for any object to perform the cleanup activity.

- Finalize method is defined in 'java.lang.Object' class.

- Any exception is thrown by finalize method.

- The 'System.runFinalization()' and 'Runtime.getRuntime().runFinalization' methods increases the probability of finalize method.
Significance of Finalize method
Significance of Finalize method - The Finalize method of an object is called when GC is about to clean up the object. We can keep clean up......
What is an Object Serialization?
What is an Object Serialization? - It is the process of writing the contents of an object to a file and vice versa.....
Significance of "transient" keyword
Significance of transient keyword - The transient keyword is used within the object's member that need not be serialized...
Post your comment