Skip to content
Sharp

Engineering Interviews · interview question

In the context of Java's memory management, what is the purpose of the Survivor space?

Multiple choiceMediumchapter-20-curatedpremiumengineering-interviewsjvm-trivia
Choose one answer
Answer and explanation

Correct answer

D. To hold objects that have survived multiple garbage collections.

Why

Survivor spaces are part of the Young Generation; they hold objects that have survived at least one garbage collection. This mechanism helps determine which objects are promoted to the Tenured space.

Test yourself on Engineering Interviews

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

Start free test
All Engineering Interviews questions →