When Thread.sleep() is called inside a synchronized method or block, does the Thread release the object lock?
No, Thread definitely does not release the lock before it goes to sleep, if it is in a synchronized method or block. That is why we should use wait(), notify(), notifyAll() defined in Object in synchronized method or block. Do not sleep() there unless you want the program totally stop, please! Write some code, you will see it easyly. Or read JDK Doc here: http://java.sun.com/j2se/1.3/docs/api/java/lang/Thread.html#sleep(long)Here is a example, sleepInsteadOfWaitNotify() method causes t2 and t3 totally starved to death.