When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
Answer / Sumit Batham
The wait(), notify(), and notifyAll() methods in Java are used for thread synchronization. When a thread calls the wait() method, it releases the lock on the object, goes into waiting state, and allows another thread to acquire the lock. The notify() method wakes up one waiting thread, and notifyAll() wakes up all waiting threads.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the is a and has a relation ship in oops concept in java?
What is static keyword?
State one difference between a template class and class template.
Does constructor creates the object ?
What is a constructor, constructor overloading in java?
Is java an open source?
What is included in core java?
How to create a base64 decoder in java8?
How can you generate random numbers in java?
Which One is optimal to choose ? Syncronized hash map or Hash table with single thread model? How can a hash map syncronized with out using syncrozed blocks in programm?
How to solve the problem of generating the unique hash keys with hash function?
what is the difference b/w design pattern and architecture