Java concurrency lock and condition usage
<p>I can use <code>object.wait</code> ,<code>object.notify</code> and <code>synchronized blocks</code> to solve the producer consumer type of problems. At the same time I can use <code>locks</code> and <code>conditions</code> from <code>java.util.concurrent</code> package. I am sure I am not able to understand why we need conditions when we can use <code>object.wait</code> and <code>notify</code> to make threads waiting on some condition like queue is empty or full. Is there any other benefit we are getting if we use <code>java.util.concurrent.locks.Condition</code> ?</p>
