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


Please Help Members By Posting Answers For Below Questions

How a component can be placed on Windows?

2257


Explain how will the struts know which action class to call when you submit a form?

515


Why does the tag url-encode javascript and mailto links?

573


what are the activation groupworks?

1667


What is the relationship between an event-listener interface and an event-adapter class?

548






What state does a thread enter when it terminates its processing?

595


Why do I get a duplicate name error when loading a jar file?

538


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2248


What is the difference between RMI and Corba?

2246


What are the different types of exception?

565


What is RMI and what are the services in RMI?

599


What are the different methods of identifying an object?

563


Name three subclasses of the component class?

604


what are the advantages of JTA over JTS?

1662


What modifiers may be used with an interface declaration?

548