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
Why a client should be multithreading? Explain.
Name the eight primitive java types.
What are transaction attributes?
What restrictions are placed on the values of each case of a switch statement?
when A client sent a request to the server to open facebook page and close the browser after this request .at that time the same user do login by using a different browser then that session id will exist or not for the same client??
What happens when a thread cannot acquire a lock on an object?
What is the difference between the string and stringbuffer classes?
What are the sequence of steps to write pub or sub model kind of application?
How are the elements of a borderlayout organized?
If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?
Which containers use a border layout as their default layout?
Which javutil classes and interfaces support event handling?
What is the purpose of the wait() method?
Can I have an action without a form?
Explain the different types of memory used by jvm?