Originally posted by andy lau:
but how do you know whether there is a variable to receive the returned oa[0]?
assume there is no variable to do this,then the object must be GC.
I assumed that the question tests for the knowledge that another
reference to the object was created in that method and that setting the original reference to null did not make the object eligible for GC. As long as any other references exist, the object lives on ... of course the reference must be passed back outside the method also.