This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes thread question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "thread question" Watch "thread question" New topic
Author

thread question

joshua antony
Ranch Hand

Joined: Jun 05, 2006
Posts: 117
Which two CANNOT directly cause a thread to stop executing? (Choose Two)

1. Calling the yield method.
2. Calling the wait method on an object.
3. Calling the notify method on an object.
4. Calling the notifyAll method on an object.
5. Calling the start method on another Thread object.

Answer is 3,4.
I can understand 3 and 4, but why not 5?
Pavan Sambare
Greenhorn

Joined: Aug 21, 2006
Posts: 23
I guess this is because if the new thread on which start method is called has a higher priority, then the currently executing thread would stop and the new Thread would start executing.


SCJP 1.4 -- 98%<br />SCWCD 5 -- 97%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: thread question
 
Similar Threads
notify() and notifyAll()
Thread Question
JQ+ Threads
Some Thread Synchornization questions ?
JQ+->Threads-->waitForAll()