title: Does a thread exit out of every synchronized method or object upon blocking?
body: <p>If I have something like this</p>
  
  <pre><code>synchronized void doSomething() throws Exception {
      synchronized (lock1) {
          lock1.wait();
      }
      wait();
  }
  </code></pre>
  
  <p>Once it blocks at <code>lock1.wait()</code>,  will some other thread be able to access <code>doSomething()</code> and do work in it?</p>
  
  <p>What if the blocked thread gets signaled and regains entry to the method? will it block on <code>wait()</code> or not?</p>