title: synchronized object set to null
body: <p>I have two threads <code>Thread1</code> and <code>Thread2</code></p>
  
  <pre><code>//Within Thread1     
  synchronized(obj1)  
  {  
      obj1 = null;  
  }  
  
  //Within Thread2  
  synchronized(obj1)  
  {  
      do something  
  }   
  </code></pre>
  
  <p>If jvm first executes thread1 and sets obj1 to null, then will thread2 see that change immediately or will it take time and jvm could still run the thread2 synchronized block since obj1 is not yet null?</p>