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
How would you create a button with rounded edges?
What is the difference between a static and a non-static inner class?
What is chat area? Explain.
What is meant by method chaining?
How to pass parameters in RMI?
How is a java object message delivered to a non-java client?
How substring() method of string class create memory leaks?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
What is the difference between RMI and Corba?
Why doesn’t the focus feature on the tag work in every circumstance?
cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..
What is the relationship between local interfaces and container-managed relationships?
What value does read() return when it has reached the end of a file?
What is the form of storage space in java?
Do you think that java should have had pointers?