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...

Explain the purposes of methods wait(), notify(), notifyAll
()?

Answer Posted / sumitpalsingh

The purpose of using the wait(),notify() and notifyAll() methd is used for interThread communication.
for Example :-There is a n situation communication between Producer and Consumer...Producer wll produce an item and go to waiting state by using wait() method.and it will notify to the consumer for to consume an item. After conume an Item Consumer will come into waiting state by using wait() method ..and give the notification to Produer by using notify() method to produce an item.But all these methods are called only in synhronized() method or synchronized block.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is handle?

2366


What are JTA/JTS and how they used by client?

2222


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

1132


What are the oops concept?

1070


Explain about local interfaces.

1053


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??

1538


If your ui seems to freeze periodically, what might be a likely reason?

1038


What restrictions are placed on the location of a package statement within a source code file?

1112


how do you Handle Front End Application data against DB with example?

1980


What is the difference between the string and stringbuffer classes?

1099


Which class is the immediate superclass of the menucomponent class?

1198


Difference between loadclass and class.forname?

1044


How to implement RMI in Java?

2870


What is a modular application?

1076


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

1029