FileDocCategorySizeDatePackage
RaceDemo.javaAPI DocExample410Tue Dec 12 18:57:48 GMT 2000None

RaceDemo

public class RaceDemo extends Object

Fields Summary
private static final int
NUMRUNNERS
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


         
        SelfishRunner[] runners = new SelfishRunner[NUMRUNNERS];

        for (int i = 0; i < NUMRUNNERS; i++) {
            runners[i] = new SelfishRunner(i);
            runners[i].setPriority(2);
        }
        for (int i = 0; i < NUMRUNNERS; i++)
            runners[i].start();