This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
OH!.I never ever heard about this method before in my life.... waitForAll() Here is the question. Question ID :958269346510 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 MediaTracker Object Correct Answer are 1,2,3 & 5. A/C to me 1: is correct, since it is not must that the thread which has called yield will leave Running state. 2:is obviously correct,will stop the calling Thread. 3:The calling Thread will must leave the running state & move to waiting state(in this case monitor is also release) 4:wait(),notify() & notifyAll() are always called on Threads rather than Objects. 5: Viki.waitForAllRanchers()??? Bye. Viki.
------------------ Count the flowers of ur garden,NOT the leafs which falls away!