Skip to content
Sharp

Garbage Collection · interview question

Why does the Old Generation in Java's memory model matter in practice?

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

Correct answer

B. To store long-lived objects that have survived multiple garbage collections.

Why

The Old Generation is designed to store objects that have a longer lifespan, which have survived several collections in the Young Generation and are assumed to be needed for a longer duration.

Test yourself on Garbage Collection

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

Start free test
All Garbage Collection questions →