|
Explanation: First of all, there is an error on line 16. It should print ‘return o’ rather than ‘return 0’. Also, the correct answer is C. rather than B. In fact, two different references that points to the same object are created. The first one is ‘o’ and the second one is oa[0]. Therefore, both objects need to be assigned the null value before the object is eligible for garbage collection.
|