1
JavaAdvanced#memory#gc
Young Generation (Eden + two Survivor spaces) holds newly created objects and is collected frequently with a Minor GC. Old Generation (Tenured) holds long-lived objects promoted from Young Gen, collected less often with a Major/Full GC. Metaspace stores class metadata (replacing PermGen since Java 8).
// Object created -> Eden space // Survives a few GC cycles -> moved to Survivor space // Survives further -> promoted to Old Generation