title: What is the Synchronization context In Java
body: <p>All of you know the synchronization context in Java that they are can be </p>
  
  <ul>
  <li>on the instance.</li>
  <li>on the java.lang.Class instance for a certain loaded class.</li>
  <li>on a given object</li>
  </ul>
  
  <p>And I need to ask; When i write </p>
  
  <pre><code>Dimension d = new Dimension();
  
  synchronized(d){
    // critical atomic operation
  }
  </code></pre>
  
  <p>synchronization of a given object equal to synchronization on the instance practically.</p>
  
  <p>so when I write <em>synchronized(d)</em> where <em>d</em> is an instance of object, then the thread will gain the lock for all synchronized instance block of code.</p>
  
  <p>Can you please give me more details about synchronization context.</p>
  
  <p>Your replies will be appreciated.</p>