How to write a Java interface so that the function of sleep for one second?

Thread sleep:

try{

 Thread.sleep(1000);

}catch(InterruptedException e){

e.PrintStackTrace ();

}

This thread is a problem with sleep () method, fill in brackets sleep time, in milliseconds, 1s to fill in 1000

Guess you like

Origin www.cnblogs.com/hu-1004/p/12094994.html