<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>

In java, the
```
synchronized
```
keyword on a method basically synchronizes on the current object, so in effect it's doing what you suggest above implicitly.
You won't experience problems with synchronizing on one object in one method and then synchronizing on the same object in another method because, as you say, the current thread already holds the lock on that object.