Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How two threads will communicate with each other?

Answer Posted / bindhu

Two threads can communicate with each other using
the wait() and notify() , notifyAl() methods. wait()
method tells the thread to wait until another threads
calls notify() method.

The wait() method causes the current thread to wait
(possibly forever) until another thread notifies it of a
condition change. We use wait() in conjunction with notify
() or notifyAll() to coordinate the activities of multiple
threads using the same resources.

The notifyAll() method notifies all the threads waiting on
the monitor held by the current thread and wakes them up.
Typically, one of the waiting threads will grab the monitor
and proceed.

Is This Answer Correct ?    57 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is aop(assepct oriented programing)?

994


what is a non-repeatable read?

2320


What is the difference between session and entity beans?

1051


How is a java object message delivered to a non-java client?

997


To what value is a variable of the string type automatically initialized?

1080


how to use debug in my elipse to solve problems that exist in my project

2220


what are memory considerations of jsp compares to other web components?

6465


Can I use multiple html form elements with the same name?

1000


What is the argument type of a programs main() method?

1064


What is the purpose of the finally clause of a try-catch-finally statement?

983


What is the RMI and Socket?

1012


which type of objects reference will be given to client?

2435


Java is fully object oriented languages or not?

945


wahts is mean by dynavalidatorform in struts/

1997


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

4173