Java examples for Thread:Thread Operation
Pausing the Current Thread
public class Main { public static void main(String[] args) { try {/*from w w w . j a va 2 s. c om*/ long numMillisecondsToSleep = 5000; // 5 seconds Thread.sleep(numMillisecondsToSleep); } catch (InterruptedException e) { } } }