• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Threads

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai ranchers
can any one give the ans for this question



Which statement is true?

A. If only one thread is blocked in the wait method of an object, and another thread
executes the modify on that same object, then the first thread immediately
resumes execution.
B. If a thread is blocked in the wait method of an object, and another thread
executes the notify method on the same object, it is still possible that the first
thread might never resume execution.
C. If a thread is blocked in the wait method of an object, and another thread
executes the notify method on the same object, then the first thread definitely
resumes execution as a direct and sole consequence of the notify call.
D. If two threads are blocked in the wait method of one object, and another thread
executes the notify method on the same object, then the first thread that executed
the wait call first definitely resumes execution as a direct and sole consequence
of the notify call.

by
velan vel
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I think the answer is B
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic