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
What is adapter in java?
What is nan in java?
I want to store more than 10 objects in a remote server? Which methodology will follow?
What does microservices mean?
how to run ecllipse with jettyserver for windows environment using batch file
Explain the different forms of polymorphism?
What is the size of arraylist in java?
Does variable declaration allocate memory?
What is a flag variable?
How do you declare an array that will hold more than 64KB of data?
What is a qms manual?
What is int argc char * argv?
How do you escape a string?
What is the primitive type byte?
Which keyword specify that a variable is effectively final ?