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

Which container method is used to cause a container to be laid out and redisplayed?

1139


Have you used threads in Servelet?

2509


why static class in java

1775


What is the difference between the ‘font’ and ‘fontmetrics’ class?

1159


To identify IDL language what mapping mechanism is used?

3945


What are transaction attributes?

1113


What is the purpose of the notify() method?

1077


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

1545


What are the different class loaders used by jvm?

1099


What are the call back methods in entity bean?

1072


How would you create a button with rounded edges?

1153


What are the steps to write p-to-p model application?

2484


What do you mean by Socket Programming?

1089


What is in-memory replication?

1065


What is RMI and what are the services in RMI?

1176