Which of the following will directly stop the execution of a Thread?
Correct answer(s):
wait()
Practice related MCQ quizzes and improve step by step.
Which of the following will directly stop the execution of a Thread?
wait()
Which three guarantee that a thread will leave the running state?
wait()sleep(1000)aLiveThread.join()Which two of the following methods are defined in class Thread?
start()run()Which cannot directly cause a thread to stop executing?
Which three are methods of the Object class?
notify();notifyAll();wait(long msecs);Which two are valid constructors for Thread?
Thread(Runnable r, String name)Thread()What is the name of the method used to start a thread execution?
start();
What allows the programmer to destroy an object x ?