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

全部博文(469)

文章存档

2011年(82)

2010年(284)

2009年(69)

2008年(34)

我的朋友

分类:

2010-04-13 09:57:35

Killtest题库网分享的考试的信息:

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

下面是从题库网上整理出来的一些题目:

1. 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

2. Click the Exhibit button.What is the output if the main() method is run?

A. 4

B. 5

C. 8

D. 9

E. Compilation fails.

F. An exception is thrown at runtime.

G. It is impossible to determine for certain.

Answer: D

3. Given:

1. public class Threads4 {

2. public static void main (String[] args) {

3. new Threads4().go();

4. }

5. public void go() {

6. Runnable r = new Runnable() {

7. public void run() {

8. System.out.print("foo");

9. }

10. };

11. Thread t = new Thread(r);

12. t.start();

13. t.start();

14. }

15. }

What is the result?

A. Compilation fails.

B. An exception is thrown at runtime.

C. The code executes normally and prints "foo".

D. The code executes normally, but nothing is printed.

Answer: B

4. Which Man class properly represents the relationship "Man has a best friend who is a Dog"?

A. class Man extends Dog { }

B. class Man implements Dog { }

C. class Man { private BestFriend dog; }

D. class Man { private Dog bestFriend; }

E. class Man { private Dog; }

F. class Man { private BestFriend; }

Answer: D

  想要下载更多的SCJP 310-065题库资料,你可以登录killtest题库网进行下载!

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