程序休眠

在某些编程环境里,程序会在屏幕上一闪而过,可以将下面代码置于main的末尾:

try{
Thread.currentThread().sleep(5*1000);
}catch(InterruptedException e){
}

作用是暂停输出5秒

你可能感兴趣的:(程序休眠)