Don,
In your g.c. questions 4-6 one of the options is :
a. An unreachable object can never become reachable again.
You are stating in the answers:
Objects that are unreachable can become reachable again if the finalize method assigns a reference to its instance to a member of another object that is reachable.
Here is an excerpt from the article on the subject (
http://www.artima.com/insidejvm/ed2/gcP.html)
It says: "An object is in the RESURRECTABLE state if it is not currently reachable by tracing the graph of references starting with the root nodes, but could potentially be made reachable again later when the garbage collector executes some finalizer. All objects, not just objects that declare a finalize() method, pass through the resurrectable state. As mentioned in the previous section, the finalizer for an object may "resurrect" itself or any other resurrectable object by making the objects reachable again. Because any object in the resurrectable state could potentially be made reachable again by its own or some other object's finalize() method, the garbage collector cannot reclaim the memory occupied by a resurrectable object before it makes certain the object won't be brought back to life through the execution of a finalizer. By running the finalizers of all resurrectable objects that declare a finalize() method, the garbage collector will transform the state of all resurrectable objects, either back to the reachable state (for objects that get resurrected), or forward to the unreachable state.
The UNREACHABLE state indicates not only that an object is no longer reachable, but also that the object cannot be made reachable again through the execution of some finalizer. Unreachable objects can no longer have any affect on the running program. The garbage collector, therefore, is free to reclaim the memory they occupy."
Am I missing something?
Anna.