填空题What is the name of the method that threads can use to pause their execution until signalled to continue by another thread? () Fill in the name of the method (do not include a parameter list).

题目
填空题
What is the name of the method that threads can use to pause their execution until signalled to continue by another thread? () Fill in the name of the method (do not include a parameter list).
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

What is the name of the method that threads can use to pause their execution until signalled to continue by another thread? () Fill in the name of the method (do not include a parameter list).


正确答案:"wait"

第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题:

Given that t1 is a reference to a live thread, which is true?()

A.The Thread.sleep() method can take t1 as an argument.

B.The Object.notify() method can take t1 as an argument.

C.The Thread.yield() method can take t1 as an argument.

D.The Thread.setPriority() method can take t1 as an argument.

E.The Object.notify() method arbitrarily chooses which thread to notify.


参考答案:E

第4题:

Given that t1 is a reference to a live thread, which is true?()

  • A、The Thread.sleep() method can take t1 as an argument.
  • B、The Object.notify() method can take t1 as an argument.
  • C、The Thread.yield() method can take t1 as an argument.
  • D、The Thread.setPriority() method can take t1 as an argument.
  • E、The Object.notify() method arbitrarily chooses which thread to notify.

正确答案:E

第5题:

Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()

  • A、Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.
  • B、Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.
  • C、Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.
  • D、Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.

正确答案:B

第6题:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the LINQ ParallelEnumerable. AsParallel method to perform multiple queries on a database. You need to ensure that queries can execute on separate threads concurrently. What should you do? ()

  • A、 Use the AsOrdered method.
  • B、 Use the SelectMany method.
  • C、 Use the AutoBuffered option in the WithMergeOptions method.
  • D、 Use the WithExecutionMode method with the ParallelExecutionMode.ForceParallelism parameter.

正确答案:D

第7题:

Which two CANNOT directly cause a thread to stop executing?()

  • A、 Calling the yield method.
  • B、 Calling the wait method on an object.
  • C、 Calling the notify method on an object.
  • D、 Calling the notifyAll method on an object.
  • E、 Calling the start method on another Thread object.

正确答案:C,D

第8题:

The WF_PARAMETER_LIST_T datatype can include up to a maximum of ()parameter name and value pairs.

A.99

B.100

C.101

D.999

E.1000


参考答案:B

第9题:

Given this method in a class:  public String toString() {  StringBuffer buffer = new StringBuffer();  buffer.append(‟<‟);  buffer.append(this.name);  buffer.append(‟>‟);  return buffer.toString();  }  Which is true?() 

  • A、 This code is NOT thread-safe.
  • B、 The programmer can replace StringBuffer with StringBuilder with no other changes.
  • C、 This code will perform well and converting the code to use StringBuilder will not enhance the performance.
  • D、 This code will perform poorly. For better performance, the code should be rewritten: return “<“+ this.name + “>”;

正确答案:B

第10题:

public class Person {  private name;  public Person(String name) {  this.name = name;  }  public boolean equals(Object o) {  if( !o instanceof Person ) return false;  Person p = (Person) o;  return p.name.equals(this.name);  }  }  Which is true?() 

  • A、 Compilation fails because the hashCode method is not overridden.
  • B、 A HashSet could contain multiple Person objects with the same name.
  • C、 All Person objects will have the same hash code because the hashCode method is not overridden.
  • D、 If a HashSet contains more than one Person object with name=”Fred”, then removing another person, also with name=”Fred”, will remove them all.

正确答案:B

更多相关问题