Sail E0 Webinar
Question

Which statement is true?


Options:
A .  All objects that are eligible for garbage collection will be garbage collected by the garbage collector.
B .  Objects with at least one reference will never be garbage collected.
C .  Objects from a class with the finalize() method overridden will never be garbage collected.
D .  Objects instantiated within anonymous inner classes are placed in the garbage collectible heap.
Answer: Option D

All objects are placed in the garbage collectible heap.

Option A is incorrect because the garbage collector makes no guarantees.

Option B is incorrect because islands of isolated objects can exist.

Option C is incorrect because finalize() has no such mystical powers.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers