"Thread Sleep"
If you want the currently executing thread to pause for a while and go into a blocking state, you can do so by calling the static method sleep () method of the thread class.
There are two overloaded forms of the Sleep () method:
1.static void sleep (Long Millis): lets the currently executing thread pause for millis milliseconds and into a blocking state.
2.static void sleep (Long millis,int Nanos): This method is rarely used with nanoseconds.
After the current thread calls the sleep () method into a blocking state, the thread will not get an execution opportunity during its sleep period, even if there are no other executable threads in the system, and the thread in sleep () will not execute.
So the sleep () method is often used to pause the execution of a program.
"Sample Code"
Relatively simple, no demo
09_ Control Thread _ Thread sleeping sleep