When a thread enters in a synchronized method or in a synchronized block, then automatically it acquires first lock.
In your code, when mthd2() is called which is synchronized then automatically thread which is processing mthd1() will acquire the lock of that object which is referred by
test.
Naseem
[ June 15, 2006: Message edited by: Naseem Khan ]