Hello,
Here is a wait/notifyAll code I wrote getting idea from
SCJP Kathy Sierra book.
I used while loop with boolean for ensuring "if notifyAll() executes before wait(), threads doesn't keep on waiting."
Lets assume 3rd Reader
thread executes before calculator thread and enters wait on calc.
then calculator executes.
then why Reader thread not keep waiting due to wait() ?
Reply asap if possible. thanks