OCJP(310-065)

多选题Which two statements are true?()AIt is possible for more than two threads to deadlock at once.BThe JVM implementation guarantees that multiple threads cannot enter into a deadlocked state.CDeadlocked threads release once their sleep() method’s sleep du

题目
多选题
Which two statements are true?()
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 ofdeadlocking by insertinginvocations of Thread.yield().

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Which two statements are true about hierarchical architecture? ()(Choose two.)

A. You can assign a logical interface to multiple zones.

B. You cannot assign a logical interface to multiple zones.

C. You can assign a logical interface to multiple routing instances.

D. You cannot assign a logical interface to multiple routing instances.


参考答案:B, D

第2题:

public class Threads2 implements Runnable {  public void nun() {  System.out.println(”run.”);  throw new RuntimeException(”Problem”);  }  public static void main(String[] args) {  Thread t = new Thread(new Threads2());  t.start();  System.out.println(”End of method.”);  }  }  Which two can be results?()

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

正确答案:D,E

第3题:

Which two are true?()

A.A finalizer may NOT be invoked explicitly.

B.The finalize method declared in class Object takes no action.

C.super.finalize()is called implicitly by any over riding finalize method.

D.The finalize method for a given objec twill be called no more than once by the garbage collector.

E.The order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.


参考答案:B, D

第4题:

Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object?()

  • A、When using versions of Java technology earlier than 5.0.
  • B、When sharing a StringBuffer among multiple threads.
  • C、When using the java.io class StringBufferInputStream.
  • D、When you plan to reuse the StringBuffer to build more than one string.

正确答案:A,B

第5题:

Which of the following best describes Simultaneous Multi-threading (SMT)?()

  • A、A POWER5 microprocessor feature that allocates two processors to each application
  • B、A Workload Manager feature that allows two processing threads to be executing on a single processor
  • C、An AIX v5.2 feature that allows two processing threads to be executing on a single processor concurrently
  • D、A POWER5 microprocessor feature that allows two processing threads to be executing on a single processor concurrently

正确答案:D

第6题:

A double male coupling is one that ______.

A.has left hand twist

B.has inside threads on both ends

C.has outside threads on both ends

D.takes two men to operate


正确答案:C
一个双凸链接件,两端有外螺旋结构。

第7题:

Which two of statements are true?()

  • A、It is possible to synchronize static methods.
  • B、When a thread has yielded as a result of yield(), it releases its locks.
  • C、When a thread is sleeping as a result of sleep(), it releases its locks.
  • D、The Object.wait() method can be invoked only from a synchronized context.
  • E、The Thread.sleep() method can be invoked only from a synchronized context.
  • F、When the thread scheduler receives a notify() request, and notifies a thread, that thread immediately releases its lock.

正确答案:A,D

第8题:

Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object?()

A.When using versions of Java technology earlier than 5.0.

B.When sharing a StringBuffer among multiple threads.

C.When using the java.io class StringBufferInputStream.

D.When you plan to reuse the StringBuffer to build more than one string.


参考答案:A, B

第9题:

Which two statements are true about hierarchical architecture? ()(Choose two.)

  • A、You can assign a logical interface to multiple zones.
  • B、You cannot assign a logical interface to multiple zones.
  • C、You can assign a logical interface to multiple routing instances.
  • D、You cannot assign a logical interface to multiple routing instances.

正确答案:B,D

第10题:

Which two statements are true?()

  • 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 ofdeadlocking by insertinginvocations of Thread.yield().

正确答案:A,F

更多相关问题