Pausing the Current Thread: a thread can temporarily stop execution. : Thread Status « Threads « Java
- Java
- Threads
- Thread Status
Pausing the Current Thread: a thread can temporarily stop execution.
public class Main {
public static void main(String[] argv) throws Exception {
long numMillisecondsToSleep = 5000; // 5 seconds
Thread.sleep(numMillisecondsToSleep);
}
}
Related examples in the same category