310-065認証を持つなら、全世界に共通した適切な判断基準で、技術力の評価を行うことができます。全世界共通の310-065認定により、技術者の高い技術レベルが保証されます。310-065認定取得により、ビジネスチャンスの場が大きく広がります。この310-065認定を持って名刺等に認定ロゴを印刷することも可能です。でもどうやってこの310-065 認証書を手に入ります。KILLTEST今は対策を出します。この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
5. Given:
1. class PingPong2 {
2. synchronized void hit(long n) {
3. for(int i = 1; i < 3; i++)
4. System.out.print(n + "-" + i + " ");
5. }
6. }
7. public class Tester implements Runnable {
8. static PingPong2 pp2 = new PingPong2();
9. public static void main(String[] args) {
10. new Thread(new Tester()).start();
11. new Thread(new Tester()).start();
12. }
13. public void run() { pp2.hit(Thread.currentThread().getId()); }
14. }
Which statement is true?
A. The output could be 5-1 6-1 6-2 5-2
B. The output could be 6-1 6-2 5-1 5-2
C. The output could be 6-1 5-2 6-2 5-1
D. The output could be 6-1 6-2 5-1 7-1
Answer: B
6. 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