使用finalize()方法让对象进行自救
demo代码:import java.util.concurrent.TimeUnit;public class ObjectHelpSelf { private static ObjectHelpSelf objectHelpSelf = null; @Override protected void finalize() throws Throwable { System.out.println("进入finalize方法中,对象开始自救")