FileDocCategorySizeDatePackage
Consumer.javaAPI DocExample456Tue Dec 12 18:57:48 GMT 2000None

Consumer

public class Consumer extends Thread

Fields Summary
private CubbyHole
cubbyhole
private int
number
Constructors Summary
public Consumer(CubbyHole c, int number)

        cubbyhole = c;
        this.number = number;
    
Methods Summary
public voidrun()

        int value = 0;
        for (int i = 0; i < 10; i++) {
            value = cubbyhole.get();
            System.out.println("Consumer #" + this.number
                               + " got: " + value);
        }