Sail E0 Webinar
Question

Which of these method is used to avoid polling in Java?


Options:
A .  wait()
B .  notify())
C .  notifyAll()
D .  All of the mentioned
Answer: Option D

Polling is a usually implemented by looping in CPU is wastes CPU's time, one thread 

being executed depends on other thread output and the other hread depends on the 

response on the data given to the first thread. In such situation CPU's time is wasted, 

in Java this is avoided by using methods wait(), notify() and notifyAll().




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers