Answer
Mark-and-Sweep marks live objects and removes unused ones.
Generational GC optimizes by separating objects into young and old generations.
Stop-the-world pauses occur during GC phases.
Modern collectors like G1 and ZGC reduce latency.
Generational GC optimizes by separating objects into young and old generations.
Stop-the-world pauses occur during GC phases.
Modern collectors like G1 and ZGC reduce latency.