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
Can list contain null in java?
What is ternary operator?
Where local and global variables are stored?
Which is better singleton or static class?
What is java beans?
What kind of variables a class can consist of?
What is the difference between checked exception and unchecked exception?
What happens when a thrown exception is not handled?
Does apple use java?
What do you mean by scope of variable?
Is cout buffered?
What is t in parametric equations?
Why arraylist is used in java?
What do you mean by garbage collection used in java?
What is the use of conditional statement?