Skip to content
Sharp

Performance Tuning · interview question

Why does the difference between the Young and Old Generation in the Generational Garbage Collection model matter in practice?

Multiple choiceMediumchapter-14-curatedpremiumperformance-tuningoutofmemoryerrors
Choose one answer
Answer and explanation

Correct answer

D. Young Generation holds short-lived objects, Old Generation holds long-lived objects.

Why

In the Generational Garbage Collection model, the Young Generation is where new objects are allocated and most of them die young. The Old Generation is for objects that have survived multiple garbage collection cycles and are expected to have a longer lifespan.

Test yourself on Performance Tuning

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

Start free test
All Performance Tuning questions →