日期:2014-05-20 浏览次数:20589 次
public class A
{
public static A a1 = new A();
public static void main(String [] args ) throws Exception{
a1 = null;
System.gc();
Thread.sleep(300);
System.out.println(a1);
a1 = null;
System.gc();
Thread.sleep(300);
System.out.println(a1);
}
protected void finalize() throws Throwable {
a1 = this;
}
}