Select the correct answerWhich of these method waits for the thread to terminate?Optionsjoin()isAlive()sleep()stop()
Question
Select the correct answerWhich of these method waits for the thread to terminate?Optionsjoin()isAlive()sleep()stop()
Solution
The correct answer is join(). This method in Java waits for the thread to terminate.
Similar Questions
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()
Select the correct answerWhich of these method of Thread class is used to Suspend a thread for a period of time?Optionssleep()suspend()stop()terminate()
Select the correct answerWhich of this method is used to find out that a thread is still running or not?OptionsisAlive()Alive()run()checkRun()
Select the correct answerWhich of the following will ensure the thread will be in running state?Optionsyield()wait()Thread.killThread()notify()
Which method is used to wait for a thread to complete its execution?join()wait()stop()terminate()
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.