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
What is ripple effect?
How many times may an objects finalize() method be invoked by the garbage collector?
What is the diffrence between a local-tx-datasource and a xa-datasource?
What is the difference between RMI and Corba?
Do we need to override service() method
What is the relationship between the canvas class and the graphics class?
What class is the top of the awt event hierarchy?
Can I import same package/class twice? Will the jvm load the package twice at runtime?
How to pass parameters in RMI?
What is in-memory replication?
How can I scroll through list of pages like the search results in google?
When a thread blocks on i/o?
Can constructors be synchronized in java?
what are memory considerations of jsp compares to other web components?
What is jboss?