Originally posted by Jimmy Blakely:
Well tomorrow is the big day.
But before then, I have a quick question regarding garbage collection.
Good luck!!!
If you explicitly call the finalize() method of an object, will the system still invoke the method right before destroying it.
If you explicitly call finalize it will execute as a normal method and not release any memory. It will still be executed when the object is destroyed.
What if the object is resurrected during the execution of its finalize method. when it becomes eligible for garbage collection again will its finalize method be called yet again?
Yes
The following code shows your first example:
hope that helps
Dave
SCJP