I am a bit confused with Thread.sleep() method. if Thread.sleep() is a static method, how does two threads know which is put to sleep. For example,
Thread.sleep()
It can find the current thread from Thread.currentThread(). The current thread only can put itself to sleep.
Thread.currentThread()