有关线程的一道题目

wanghu2000 2006-09-21 12:01:29
有关线程的一道题:
Which two CANNOT directly cause a thread to stop
executing? (Choose Two)
A. Calling the yield method
B. Calling the wait method on an object
C. Calling the notify method on an object
D. Calling the NotifyAll method on an object
E. Calling the start method on another Thread object

请问:什么是“CANNOT directly cause a thread to stop”是什么意思,还有“directly cause a thread to stop”吗?此话怎讲。

...全文
116 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wanghu2000 2006-09-21
  • 打赏
  • 举报
回复
答案是A.E
可什么是“不能直接导致正在执行的线程终止”呢?
B为什么不对?
我理解的yield()方法是当前线程放弃CPU的使用,将使用权交给另一个线程,但并没有终止啊。请解释一下yield()的用法吧,谢谢!!!
AIGPTchina 2006-09-21
  • 打赏
  • 举报
回复
不能直接导致正在执行的线程终止
AE
fishyqd 2006-09-21
  • 打赏
  • 举报
回复
C D?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧