rohan yadav wrote:Then, what array=null means in above example?
And how many objects are eligible for garbage collection
array=null only modifies the local array in method
f. It doesn't effect the original
array in main method. Thus 3 objects are eligible for GC i.e.
array[0], array[1] and
array[2]...