wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes a simple question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "a simple question" Watch "a simple question" New topic
Author

a simple question

andy wang
Greenhorn

Joined: Apr 30, 2002
Posts: 17
Which two CANNOT directly cause a thread to stop executing? (Choose Two)
A.Calling the yield method
B.Calling the wait method on an object
C.Calling the notify method on an object

D.Calling the NotifyAll method on an object
E.Calling the start method on another Thread object


Name:Andy Wang<br />From:SouthEast University China.<br />Major:Communication Engineering
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Andy
Please do a search for this. It has been answered quite a few times in a lot of detail.


Dave
andy wang
Greenhorn

Joined: Apr 30, 2002
Posts: 17
sorry, i can not find the related topic
can you explain it to me? thanks!
[ April 30, 2002: Message edited by: andy wang ]
R Arun
Ranch Hand

Joined: Apr 20, 2002
Posts: 33
Seems like there are 3 correct answers.
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262
If you want clarification, it would be a good idea to tell us which three you think are correct. Then someone can tell you about which one you are mistaken and why.
[ April 30, 2002: Message edited by: Dave Winn ]

Fun programming etcetera!
R Arun
Ranch Hand

Joined: Apr 20, 2002
Posts: 33
C, D, E.
andy wang
Greenhorn

Joined: Apr 30, 2002
Posts: 17
i know that the notify() and the notifyAll() just let the thread in the waiting pool to become the Seeking Lock state,so C and D is definitly correct.
how about the choice E? i think it will only cause the thread eligible to execute but not directly stop a thread.am i right?
wang jie
Greenhorn

Joined: May 01, 2002
Posts: 8
i think you are right
 
wood burning stoves
 
subject: a simple question
 
Similar Threads
Creating multiple children threads
difference between wait() and sleep()
Multithreading
javaprepare.com mock exam
thread problem