FileDocCategorySizeDatePackage
Consumer.javaAPI DocExample358Tue Dec 12 18:58:26 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);
	}