Question { HCL, 7535 }
How can two threads be made to communicate with each other?
Answer
Two threads can communicate with each other using
the wait() and notify() , notifyAl() methods. wait()
method tells the thread to wait until another threads
calls notify() method