GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java

 Print  |  
Question:  Inter Thread Communication

Answer: What are all the methods used for Inter Thread communication and what is the class in which these methods are defined?


December 12, 2008 00:17:21 #1
 maneesh.ce.2007   Member Since: November 2008    Total Comments: 10 

RE: Inter Thread Communication
 
There are three ways in which Threads communicate with each other :

wait: It tells the calling thread to give up the monitor until some other thread enters the same monitor an calls Notify or Notifyall...

notify: It wakes up the first thread that called Wait() on the same object...

NotifyAll: It allows all the threads that called Wait() on the same object.The thread having the highest priority will run first...
     

 

Back To Question