Which class or interface defines the wait()
, notify()
, and notifyAll()
methods?
Topic: Threads
Which of the following will not directly cause a thread to stop?
Assume the following method is properly synchronized and called from a thread A on an object B:
wait(2000);
After calling this method, when will the thread A become a candidate to get another turn at the CPU?
Which method registers a thread in a thread scheduler?
Which will contain the body of the thread?
Which method must be defined by a class implementing the java.lang.Runnable interface?
Which of the following will directly stop the execution of a Thread?
Which three guarantee that a thread will leave the running state?
Which two of the following methods are defined in class Thread?
Which cannot directly cause a thread to stop executing?
Which three are methods of the Object class?
Which two are valid constructors for Thread?
What is the name of the method used to start a thread execution?