How can two threads be made to communicate with each other?

Answer Posted / @dania@

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

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is jar?

818


What is data type in java?

683


What is quick sort in java?

768


What is a generic type?

747


What is data structure in java?

706


What is the most important feature of java? What is an interface?

738


Tell me how many ways are there to initialise an integer with a constant.

843


What are the 3 types of control structures?

693


What are abstract methods in java?

861


What is meant by anonymous class?

786


What is bom encoding?

758


What is thread life cycle in java?

795


How many types of classes are there in java?

754


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

815


What is difference between module and function?

749