This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a simple question

 
andy wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andy
Please do a search for this. It has been answered quite a few times in a lot of detail.
 
andy wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like there are 3 correct answers.
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
R Arun
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C, D, E.
 
andy wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you are right
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic