title: What's the best alternative to wait...notify for low level synchronization?
body: <p>As far as I know, <code>wait()</code> and <code>notify()</code> have been replaced with better concurrency mechanisms. So, what better alternative would you choose, say for implementing <a href="https://codereview.stackexchange.com/questions/646/please-review-this-java-synchronous-queue-implementation">a synchronized queue</a>?</p>
  
  <p>In what sense exactly are they "better"?</p>
  
  <p><strong>Edit</strong>: This ("implement a synchronous queue") is an interview question. An acceptable answer cannot use BlockingQueue or other queue implementation. It might, however, use other synchronization constructs such as CountDownLatch. I do not have an exhaustive list of allowed and forbidden classes - use your heads.</p>