1.

After line 8 runs. how many objects are eligible for garbage collection?

Answer» By the time line 8 has run, the only object without a reference is the one generated as a result of line 6. Remember that "Java is pass by value," so the reference variable x is not affected by the m1() method. Ref: http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html


Discussion

No Comment Found