Java Source World A Java quick reference blog
finalize( ) method:
All the objects have finalize() method, this method is inherited from the Object class.
- finalize() is used to release the system resources other than memory(such as file handles & network connections.
- finalize( ) is used just before an object is destroyed and can be called prior to garbage collection.
- finalize() is called only once for an Object. If any exception is thrown in the finalize() the object is still eligible for garbage collection.
- finalize() can be called explicitly. And can be overloaded, but only original method will be called by Garbage-collect.
- finalize( ) may only be invoked once by the Garbage Collector when the Object is unreachable.
Continue Reading:
Implementing equals() and hascode() methods in java
Equals() and Hashcode()
What will happen if equals and hashcode not overridden
What are marker interfaces in java
Serialization in java
Implementing equals() and hascode() methods in java
Equals() and Hashcode()
What will happen if equals and hashcode not overridden
What are marker interfaces in java
Serialization in java
No comments:
Post a Comment