Class BobAlice
java.lang.Object
BobAlice
public class BobAlice
- extends Object
This class shows how to use a semaphore to make sure that
Bob eats only after Alice eats. The semaphore can be
acquired when its value is bigger than zero.
Method Summary |
static void |
main(String[] args)
Main program. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BobAlice
public BobAlice()
main
public static void main(String[] args)
- Main program.