File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes JQ+ Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "JQ+ Threads" Watch "JQ+ Threads" New topic

JQ+ Threads

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Which of the following may pause/stop the current thread?
1) Calling Thread.Yield()
2) Calling stop() on an object of class Thread
3) Calling someObject.wait()
4) Calling someObj.notify()
5) Calling waitForAll() on a MediaTracker Object
The answer is 1,2,3,5 .. but I would think the answer should just be 1,2,3 .. what is 'waitForAll()' just a user-defined method? Is that what I should assume? I assumed I missed something in the Thread section.
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
JQPlus is correct. Most times when you see waitFor... type of methods, they are methods that will release locks until something has finished.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Ok thanks Bill!
It is sorta covered in the JavaRanch Style Guide.
subject: JQ+ Threads
jQuery in Action, 3rd edition