Nulling only "arr" or "arr[0]" or "x", or making them point to other objects, is not enough.
We need to detach all the references to this object.
So, to make the object eligible for garbage collection, we can either :
1) set "arr" to null or to other object and set "x" to null or other object
2) or set "arr[0]" to null or other object and set "x" to null to other object
|
Oracle Certified Professional Java Programmer
Author:
JavaChamp TeamSenior Java Developer
QuizOver.com
Germany
Access: |