← Quiz: JVM Memory and Garbage Collection: all 10 questions
Quiz: JVM Memory and Garbage Collection · Question 8 of 10
Why does generational GC collect the young generation more often?
Why does generational GC collect the young generation more often?
- A.Young objects are larger
- B.Old objects cannot be collected
- C.The young generation is stored on the stack
- D.Most objects die young, so collecting Eden frees a lot of memory quickly and cheaply
Answer & explanation
Correct answer: Most objects die young, so collecting Eden frees a lot of memory quickly and cheaply
Only the few survivors are copied; everything else in Eden is reclaimed at once.
Can you get the rest right without peeking?
Take the timed Quiz: JVM Memory and Garbage Collection quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →