What are the methods used for inter-thread communication?
and in what class these methods are defined?
Answer Posted / ranganathkini
The methods used for inter-thread communication are:
1. wait() - causes thread to wait until another thread calls
the notify() or notifyAll() methods.
2. notify() - wakes up any thread waiting on this object
notifyAll() - wakes up all threads waiting on this object
These methods are a part of the java.lang.Object class.
Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
When a thread blocks on i/o?
What is abstract schema?
What are callback interfaces?
Why does the tag url-encode javascript and mailto links?
Difference between hashmap and hashtable?
Can you control when passivation occurs?
Whats new with the stop(), suspend() and resume() methods in jdk 1.2?
What if the static modifier is removed from the signature of the main method?
What’s jboss jbpm?
Why use a datasource when you can directly specify a connection details? (in a J2EE application)
What is a modular application? What does module-relative mean?
Difference between swing and awt?
Why is string immutable in java?
What is message driven beam?
What are the different approaches to represent an inheritance hierarchy?