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 mean by collections in java?
What is overloading and overriding in java?
What is thread safe in java?
Why do we create threads in java?
Can static method access instance variables ?
How do you convert an int to a double in java?
Is null keyword in java?
Does chrome use java?
what is singleton in java?
What is string in java with example?
What is immutable in java?
Difference between throw and throws?
What class allows you to read objects directly from a stream in java programming?
How to store image in arraylist in java?
This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }