// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
public class F {
    public F() {
        System.out.println("an F has been created");
    }
    protected void finalize() {
        System.out.println("the GC told the finalizer that an F is ready to be GC'ed");
    }
    public static void main(String[] args) {
        System.out.println("start");
        F o = new F();
        System.out.println("after F creation");
        o = null;
        System.out.println("after nulling");
        System.gc();
        System.out.println("after GC");
        System.out.println("done");
    }
}
