For the Sleep () method, we first need to know that the method belongs to the thread class. The wait () method is part of the object class.
The sleep () method causes the program to pause execution for the specified time, giving up the CPU to that other thread, but his monitoring state remains, and when the specified time is up, it will automatically resume its running state.
During the call to the sleep () method, the thread does not release the object lock.
When the Wait () method is called, the thread discards the object lock, enters the waiting lock pool waiting for the object, and the thread only enters the object lock pool when the Notify () method is called for this object.
Gets the object lock into the running state.
[1] http://www.cnblogs.com/hongten/p/hongten_java_sleep_wait.html
[Java] The difference between sleep and wait