Chinaunix首页 | 论坛 | 博客
  • 博客访问: 289638
  • 博文数量: 469
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 5200
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-03 16:15
文章分类

全部博文(469)

文章存档

2011年(82)

2010年(284)

2009年(69)

2008年(34)

我的朋友

分类:

2010-05-04 15:40:05

SCJP 考试题库由专业IT认证讲师及产品专家精心打造包括了当前最新的全真310-065考试试题,全部附有正确答案。并且根据考试厂商的动态变化而更新。

认证名称:Sun Certified Programmer for the Java 2 Platform. SE6.0
考题数目:267 Q&As
价格: 368.00 300.00
更新:Apr-22-2010

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: ProblemEnd of method.

Answer: DE

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() method's 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

insertinginvocations of Thread.yield().

Answer:AF

你到killtest题库网下载更多的题库!

阅读(94) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~