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 different class threads communicate with each
other?. send example code.

Answer Posted / puneet khanna

The threads in java follow Mutual exclusion( synchronized)
and co-operation;

for co-operation they need to talk to each other by messages
saying " i am waiting in the wait q anyone can acquire the
lock of the object" or" i have acquired the lock now by
notify() to the last thread who called wait() or by
notifyall() to all the threads who are in the wait q"

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is adapter in java?

875


What is nan in java?

941


I want to store more than 10 objects in a remote server? Which methodology will follow?

3123


What does microservices mean?

896


how to run ecllipse with jettyserver for windows environment using batch file

2004


Explain the different forms of polymorphism?

953


What is the size of arraylist in java?

976


Does variable declaration allocate memory?

983


What is a flag variable?

913


How do you declare an array that will hold more than 64KB of data?

1190


What is a qms manual?

939


What is int argc char * argv?

1061


How do you escape a string?

913


What is the primitive type byte?

940


Which keyword specify that a variable is effectively final ?

933