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 the difference between serializable and externalizable interfaces?

565


Is static a keyword in java?

519


What is the concept of multithreading?

516


What is the purpose of an interface?

548


What are the types of literals?

556






What is Java Reflection API? Why it’s so important to have?

599


What is difference between == and === in js?

543


What is the difference between applet and application?

542


What is high level language in computer?

530


what is the purpose of using rmisecuritymanager in rmi?

560


What are the access modifiers available in java?

553


What is a heavyweight component?

538


Is math an abstract class in java?

529


What is %d in printf?

515


Does constructor creates the object ?

577