- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
[IT认证]scjp官方题库
QUESTION NO: 1
Given:
1. public class Threads2 implements Runnable {
2.
3. public void run() {
4. System.out.println(run.);
5. throw new RuntimeException(Problem);
6. }
7. public static void main(String[] args) {
8. Thread t = new Thread(new Threads2());
9. t.start();
10. System.out.println(End of method.);
11. }
12. }
Which two can be results? (Choose two.)
A. java.lang.RuntimeException: Problem
B. run
java.lang.RuntimeException: Problem
C. End of method.
java.lang.RuntimeException: Problem
D. End of method.
run.
java.lang.RuntimeException: Problem
E. run
java.lang.RuntimeException: Problem
End of method.
Answer: D,E
QUESTION NO: 2
Which two statements are true? (Choose two.)
A. It is possible for more than two threads to deadlock at once.
B. The JVM implementation guarantees that multiple threads cannot enter into a deadlocked state.
C. Deadlocked threads release once their sleep() methods sleep duration has expired.
D. Deadlocking can occur only when the wait(), notify(), and notifyAll() methods are used
incorrectly.
E. It is possible for a single-threaded application to deadlock if synchronized blocks are used
incorrectly.
F. If a piece of code is capable of deadlocking, you cannot eliminate the possibility of deadlocking
by inserting invocations of Thread.yield().
Answer: A,F
QUESTION NO: 3
Given:
7. void waitForSignal() {
8. Object obj = new Object();
9. synchronized (Thread.currentThread()) {
10. obj.wait();
11. obj.notify();
12. }
13. }
Which statement is true?
A. This code can throw an InterruptedException.
B. This code can throw an IllegalMonitorStateException.
C. This code can throw a TimeoutException after ten minutes.
D. Reversing the order of obj.wait() and obj.notify() might cause this method to complete normally.
E. A call to notify() or notifyAll() from another thread might cause this method to complete
normally.
F. This code does NOT compile unless obj.wait() is replaced with ((Thread)
obj).wait().
Answer: B
QUESTION NO: 4
Click the Exhibit button.
您可能关注的文档
- [高三理化生]高三物理一轮复习精品教案:第11章 恒定电流.doc
- [高三理化生]高三总复习化学红对勾3-3.ppt
- [高三理化生]高三化学苏教版总复习 1-2-2-2电解质 离子反应 85张.ppt
- [高三理化生]高三物理高考考点及例题讲析7力、重力、弹力.doc
- [高三理化生]高中化学高考第一题汇编答案.doc
- [高三理化生]高中化学知识点总结及化学方程式.doc
- [高三理化生]高考励志优秀演讲.doc
- [高三理化生]高三生物专题全析——专题一 组成生命体的元素及化合物.ppt
- [高三理化生]高考物理一轮总复习鲁科版课件:第十三章第三节.ppt
- [高三英语]20042007四年高考英语试题及答案山东卷.doc
最近下载
- 水土保持监督管理培训课件.pptx VIP
- 输变电工程环境保护和水土保持全过程管控培训课件.pptx VIP
- 生产建设项目水土保持方案管理办法培训课件.pptx VIP
- 培训课件_1411dxs小天鹅纯臻2.0新品1411DXS系列.pdf VIP
- 2022年内蒙古农业大学硕士研究生入学考试公共管理专业综合基础考研真题.pdf VIP
- 郑州市第七高级中学2024-2025学年高一上学期第一次月考物理试卷.docx VIP
- 《民族音乐鉴赏方法:音乐鉴赏课教学教案》.doc VIP
- 《中国传统民族音乐赏析:音乐鉴赏课程教案》.doc VIP
- 水果店的创业计划书.docx VIP
- 一种模块式双向卡瓦锚定机构.pdf VIP
文档评论(0)