Skip to content
Sharp

Garbage Collection · interview question

What defines an 'unreachable' object in the context of Java garbage collection?

Multiple choiceEasychapter-14-curatedpremiumgarbage-collectiongenerational-gc
Choose one answer
Answer and explanation

Correct answer

C. An object with no strong references pointing to it.

Why

An 'unreachable' object is one with no strong references pointing to it. Such objects are eligible for garbage collection.

Test yourself on Garbage Collection

A free test with instant, explained results. No account needed.

Start free test
All Garbage Collection questions →