文件名称:InterruptTest2
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2013-08-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- A**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
//4、针对 interrupt 设计的作业。
//要求:
//(1)创建一个线程,让这个线程不断的打印一个字符串(每隔0.5秒打印一个字符串)
//(2)当线程启动 2秒后,调用线程的 interrupt 方法时,让线程不再打印字符串,并退出线程
//(用 isInterrupted() 方法来判断是否调用了 interrupt 方法,来控制线程的退出)-//4, the design for the interrupt job.// Requirements:// (1) create a thread, so that the constant thread prints a string (every 0.5 seconds to print a string)// (2) when the thread starts 2 seconds after the calling thread' s interrupt method , so that the thread is no longer print string and exit the thread// (used isInterrupted () method to determine whether to call the interrupt method to control the thread' s exit)
//要求:
//(1)创建一个线程,让这个线程不断的打印一个字符串(每隔0.5秒打印一个字符串)
//(2)当线程启动 2秒后,调用线程的 interrupt 方法时,让线程不再打印字符串,并退出线程
//(用 isInterrupted() 方法来判断是否调用了 interrupt 方法,来控制线程的退出)-//4, the design for the interrupt job.// Requirements:// (1) create a thread, so that the constant thread prints a string (every 0.5 seconds to print a string)// (2) when the thread starts 2 seconds after the calling thread' s interrupt method , so that the thread is no longer print string and exit the thread// (used isInterrupted () method to determine whether to call the interrupt method to control the thread' s exit)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
InterruptTest2.java