Select the correct answerWhich of these method wakes up all the threads?Optionsstart()notify()wakeAll()notifyAll()
Question
Select the correct answerWhich of these method wakes up all the threads?Optionsstart()notify()wakeAll()notifyAll()
Solution
The correct answer is notifyAll(). This method wakes up all threads that are waiting on this object's monitor.
Similar Questions
Select the correct answerWhich of these method is used to tell the calling thread to give up a monitor and go to sleep until some other thread enters the same monitor?OptionsnotifyAll()notify()wait()sleep()
Select the correct answerWhich of the following will ensure the thread will be in running state?Optionsyield()wait()Thread.killThread()notify()
Select the correct answerWhich of this method is used to find out that a thread is still running or not?Optionsrun()isAlive()checkRun()Alive()
Select the correct answerWhich of these method of Thread class is used to Suspend a thread for a period of time?Optionssuspend()terminate()sleep()stop()
Select the correct answerWhich of this method can be used to make the main thread to be executed last among all the threads?Optionsjoin()sleep()stop()call()
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.