I've gone through the K&B
Java 6 study guide in preparation for the certification exam. It appears to me that the discussion of the finalize() method on the practice exam CD is different than what's stated in the book. Can someone please clarify for me whether or not the finalize() method can really only be invoked once on an object if the class has an overriding finalize() method that gets used?
According to page 263 of the study guide: if an object becomes eligible for garbage collection after an explicit call to finalize(), the garbage collector will not run finalize() again.
What's confusing me is the explanation for one of the practice exam questions that states: "Even though finalize() was invoked explicitly for that object, the JVM can invoke finalize() one more time for that object....."
These statements seem to be contradicting each other. Am I missing something? Please help!!