Killtest题库

专业IT认证题库学习资料,助您通过IT认证考试!

« 一个优秀的CCNA能做什么?最新最全的642-983题库下载(killtest题库网提供) »

killtest题库网提供最新的310-065题库下载

 Killtest题库网专业IT认证讲师及产品专家精心打造的SCJP 310-065考试题库,包括了当前最新的全真310-065考试试题,全部附有正确答案。

  下面分享部分真题:

  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

3. Given:

1. void waitForSignal() {

2. Object obj = new Object();

3. synchronized (Thread.currentThread()) {

4. obj.wait();

5. obj.notify();

6. }

7. }

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

  你可以到killtest题库网上下载更多的310-065题库!

 

  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最近发表

Powered By Z-Blog 1.8 Arwen Build 81206

Copyright xxxx-xxxx Your WebSite. Some Rights Reserved.