Which one statement is true” a. All objects that are eligible for garbage collec
ID: 3714180 • Letter: W
Question
Which one statement is true”
a. All objects that are eligible for garbage collection will be removed from the heap by the garbage collector.
b. Objects with more than 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 method local inner classes are placed in the garbage collectible heap.
e. Once an overridden finalize() method is invoded, there is no way to make that object ineligible for garbage collection.
Explanation / Answer
Solution: a) All objects that are eligible for garbage collection will be removed from the heap by the garbage collector.This statement is true.
Because all unused and unreachable object garbage collector automatically removed from the heap.
b) object with more than one reference will never be garbage collected.
This statement is false.because isolated object are exists.
c)Object from a class with the finalize() method overridden will never be garbage collected. This statement is false. Because finalize () method has no such type of power exists.
d)Object instantiated within method local inner classes are placed in garbage collectible heap.This statement is true. Because all object are placed in garbage collectible heap.
e)Once an overridden in finalize () method is invoded, there is no way to make an object ineligible for garbage collection. This statement is true . Because this method is always called when object is destroyed finally.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.