Thread.sleep() implementation
问题 Today I had an interview on which I asked candidate quite usual and basic question about the difference between Thread.sleep() and Object.wait() . I expected him to answer something like like this, but he said these methods basically are the same thing, and most likely Thread.sleep is using Object.wait() inside it, but sleep itself doesn't require external lock. This is not exactly a correct answer, because in JDK 1.6 this method have following signature. public static native void sleep(long