title: How to implement a Binary Semaphore Class in Java?
body: <p>I can see how a "standard" Semaphore Class can be implemented in Java. However, I cant see how to implement a Binary Semaphore Class in Java. How does such implementation work? When should I call the wake and notify methods to wake and stop the threads that are on the semaphores?
  I understand what binary semaphores are, but I have no idea of how to code them.</p>
  
  <p>Edit Note: Realize that I said "BINARY" Semaphore class. The standard Semaphore class I already did and I know its correct so the standard Semaphore Class does not interest me.</p>