62,614
社区成员
发帖
与我相关
我的任务
分享
import java.io.*;
public class TestTempFile {
public static void main(String[] args) throws Exception {
TestTempFile ttf = new TestTempFile();
//表示ttf已经不可能有任何线程会使用它了
ttf = null;
//运行垃圾回收器
System.gc();
}
protected void finalize() throws Throwable {
System.out.println("it is finalized!");
}
}