szemétgyűjtés root set mark and sweep generációs class Szamlalo { public static int ertek = 0; } class Szamlalt { static int sz = ++Szamlalo.ertek; static int sz1_5 = sz; int sz2 = ++sz + ++Szamlalo.ertek; public static void main(String[] args) { new Szamlalt(); new Szamlalt(); new Szamlalt(); } } class X { void f() {} public static void main(String[] args) { X x = new X(); x.f(); // nem: f(); this.f(); } int a; void g(int y, String a) { a; this.a; int x; // nem int x; // nem int y; int z; { // nem int z; } } void h() {} void h(int) {} void h(double) {} void h(int, double) {} void h(double, int) {} void hivo() { h(); h(1); h(1.0); // nem h(1, 1); h(1.0, 1); h(double(1, 1); } }