FileDocCategorySizeDatePackage
Garbage.javaAPI DocExample3932Mon Apr 06 18:10:26 BST 1998None

Chair

public class Chair extends Object

Fields Summary
static boolean
gcrun
static boolean
f
static int
created
static int
finalized
int
i
Constructors Summary
Chair()

   
    i = ++created;
    if(created == 47) 
      System.out.println("Created 47");
  
Methods Summary
protected voidfinalize()

    if(!gcrun) {
      gcrun = true;
      System.out.println(
        "Beginning to finalize after " +
        created + " Chairs have been created");
    }
    if(i == 47) {
      System.out.println(
        "Finalizing Chair #47, " +
        "Setting flag to stop Chair creation");
      f = true;
    }
    finalized++;
    if(finalized >= created)
      System.out.println(
        "All " + finalized + " finalized");