java中可以让程序暂停几秒执行的代码

//n为毫秒数
try { Thread.sleep ( n ) ;
} catch (InterruptedException ie){}

 

try { TimeUnit.SECONDS.sleep(10); ;
} catch (InterruptedException ie){}

 

 

参考链接:http://blog.csdn.net/eric20080321/article/details/4070076

posted @ 2016-03-02 21:03  风吹的心  阅读(21874)  评论(0编辑  收藏  举报