in Education by
Which of this method is used to avoid polling in Java? (a) wait() (b) notify() (c) notifyAll() (d) all of the mentioned I got this question in my homework. The query is from Creating Threads in portion 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
Correct choice is (d) all of the mentioned The best explanation: Polling is a usually implemented by looping in CPU is wastes CPU time, one thread being executed depends on other thread output and the other thread depends on the response on the data given to the first thread. In such situation CPU time is wasted, in Java this is avoided by using methods wait(), notify() and notifyAll().

Related questions

0 votes
0 votes
0 votes
0 votes
    Which method is used to generate boolean random values in java? (a) nextBoolean() (b) randomBoolean() ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What should not be done to avoid deadlock? (a) Avoid using multiple threads (b) Avoid hold several ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of this class can be used to format dates and times? (a) Date (b) SimpleDate (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of this package is used for analyzing code during run-time? (a) java.applet (b) java.awt ( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these keywords is used to define packages in Java? (a) pkg (b) Pkg (c) package (d) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...