覆盖对象类的finalize()方法的Finalize类
public class Main { public static void main(String[] args) { // Create many objects, say 20000 objects. for(int i = 0; i < 20000; i++) { /* from 时代Java公众号*/ new Finalize(i); } } } class Finalize { private int x; public Finalize(int x) { this.x = x; } public void finalize() { System.out.println(