what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread



what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread..

Answer / Dilip Singh

"The wait(), notify(), and notifyAll() methods are used in conjunction with synchronized blocks to coordinate multiple threads. The wait() method makes a calling thread wait until it is notified by another thread, while the notify() and notifyAll() methods allow other waiting threads to resume execution."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are batch updates. in jdbc

2 Answers   Corent Technology,


How use .contains in java?

1 Answers  


What Is Pointer?

4 Answers  


What is the use of parseint in java?

1 Answers  


In java, how many ways you can take input from the console?

1 Answers  


Explain about main() method in java ?

1 Answers  


String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ?

6 Answers   Flextronics, Keane India Ltd,


Name few java 8 annotations ?

1 Answers  


Explain about method local inner classes or local inner classes in java?

1 Answers  


Can a Byte object be cast to a double value?

3 Answers   KO,


How many times finalize method will be invoked? Who invokes finalize() method in java?

1 Answers  


What is factor r?

1 Answers  


Categories