How does the G1 garbage collector prioritize heap regions during collection?
G1 GC prioritizes regions with the most garbage and tries to collect those first, in order to reduce pause times.
Exactly! G1 GC dynamically adjusts to prioritize regions with the most garbage to meet pause-time goals.
How does the `Young Generation` and `Old Generation` differ in G1 GC, and how are they handled differently?