title: Using wait() without notify() when in synchronized code piece (java)
body: <p>I wanted to know if it's possible to use wait() on a synchronized piece of code without using notify(), something like this:</p>
  
  <pre><code>wait_on(B):
      synchronized(B.monitor) {
      B.count--
          while (B.count &gt; 0) { /* wait */ }
      }
  </code></pre>
  
  <p>Thanks in advance</p>