in Education by
Which of the following will ensure the thread will be in running state? (a) yield() (b) notify() (c) wait() (d) Thread.killThread() I have been asked this question in homework. I need to ask this question from Multithreading topic in section Multithreading of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Right option is (c) wait() The explanation is: wait() always causes the current thread to go into the object’s wait pool. Hence, using this in a thread will keep it in running state.

Related questions

0 votes
0 votes
0 votes
    Which of the following is mandatory to run before running YSlow? (a) WebPageTest (b) FireBug (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of this method can be used to make the main thread to be executed last among all the threads ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following is a correct constructor for thread? (a) Thread(Runnable a, String str) (b ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following stops execution of a thread? (a) Calling SetPriority() method on a Thread object ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method waits for the thread to terminate? (a) sleep() (b) isAlive() (c) join() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to explicitly set the priority of a thread? (a) set() (b) make() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to begin the execution of a thread? (a) run() (b) start() (c ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these method is used to tell the calling thread to give up a monitor and go to sleep ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...