JAVA是否有延时语句,如过有该如何使用 Thread.sleep(延时毫秒数);注意要用try、catch捕获异常 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try{ Thread.sleep(5000);//stop 5 seconds}catch(InterruptedException e){ } 请问: zjpangxie(又胡了)如果不捕获异常会怎么样? 请问: zjpangxie(又胡了)如果不捕获异常会怎么样?会提示错误! 如果不是 Thread 而是一般的进程 ,如何延时? 查找发现 wait() 函数,但是使用会出错 一般的进程也可以那样用的!实在不行就这样:for(int i=0;i<10000000;i++); wait() ro waiFor()是等待子进程结束!public class InterruptedExceptionextends Exception Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread. 做课程设计,山寨QQ,怎么点击登陆后,插播一个gif动画呢 2个小问题 看不懂这段程序 急,在线等!关于文件下载,打开为空 applet无法找到类 如何用程序实现保存编辑的文本 怎么使用另一个类的变量?? 关于scjp的习题,,请大家帮忙看一下,,,最好有解释!!!!谢谢!! 如何对一个图像资源进行颜色过滤?即把其中的白色过滤成黑色。 访问与调用的问题 请教一个有关继承的问题 菜鸟请教使用JBUILDER X的问题,请各位指教一下!
Thread.sleep(5000);//stop 5 seconds
}
catch(InterruptedException e){
}
public class InterruptedException
extends Exception
Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.