title: Synchronising twice on the same object?
body: <p>I was wondering if in Java I would get any odd behaviour if I synchronise twice on the same object?</p>
  
  <p>The scenario is as follows</p>
  
  <pre><code>pulbic class SillyClassName {
  
      object moo;
      ...
      public void method1(){
          synchronized(moo)
          {
              ....
              method2();
              ....
          }
      }
  
      public void method2(){
          synchronized(moo)
          {
              doStuff();
          }
      }
  }
  </code></pre>
  
  <p>Both methods use the object and are synchronised on it. Will the second method when called by the first method stop because it's locked?</p>
  
  <p>I don't think so because it's the same thread but I'm unsure of any other odd results that might occur.</p>