I try not to make questions available without including an explanation of the answer. In the case of that first question I have included the explanation ...
"A reference passed into a method is passed as if it were a copy of a pointer pointer rather than the actual object. Thus if that reference is assigned to a null it makes no difference to any other copy of that pointer. Thus the code within the method findOut makes no difference to any other references. Although reference z is assigned to null reference y still points to the object so no objects are eligible for garbage collection."
Was this explanation availible/visible/correct/meaningful. Your feedback is greatly appreciated.
(This question is one that is publicly visible from the database at
http://www.jchq.net/phezam and is from the JDK1.4 subject set)
Marcus
[ July 08, 2005: Message edited by: Marcus Green ]