쓰레기 수집 - System.gc()와 System.runFinalization() 호출 예 public class Unit { int num; public Unit(int num){ this.num = num; } public int getNum(){ return num; } protected void finalize(){ System.out.println(num+"번 개체 정리"); }} public class Program { public static void main(String[] args){ Unit unit1 = new Unit(1); System.out.println("유닛 생성"+unit1.getNum()); Unit unit2 = new Unit(2); System.out.println..