文件名称:InterruptTest2
-
所属分类:
- 标签属性:
- 上传时间:2013-08-26
-
文件大小:693byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
//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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.