Monday, July 5, 2010
The finalize( ) Method
By using the finalize method, we can define specific actions that will occur when an object is just about to be reclaimed by the garbage collector. The Java run time calls this method whenever it is about to recycle an object of that class. Inside the finalize( ) method you will specify those actions that must be performed before an object is destroyed. The garbage collector runs periodically, checking for objects that are no longer referenced by any running state or indirectly through other referenced objects.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment