Skip to content
Sharp

Garbage Collection · interview question

In the context of the Weak Generational Hypothesis, which statement is true about object lifespans?

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

Correct answer

D. Most objects die young, meaning they don't survive many garbage collection cycles.

Why

The Weak Generational Hypothesis posits that most objects are short-lived, meaning they become unreachable and are collected shortly after allocation, usually during the initial few Minor GCs.

Test yourself on Garbage Collection

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

Start free test
All Garbage Collection questions →