This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which all calls stops the thread. Seeking advice to answer the exam questions.

 
Sanjay Mishra
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have found invariably 1 or more questions in all the mocks
over the calls which stops the thread.
While performing search in Javaranch I have found a nice discussion over this ("InterruptedException" july 26, 2000). Explanation in this posting have cleared most of my doubts
but still am worried about my answer choice in real exam.

1. sleep
2. stop
3. wait
4. yield
5. interrupt
6. suspend
7. waitforId/waitforData
8. blocked for io
9. If the current thread starts the new thread
10. Thread with higher priority is in the pool.
Ajith has explained that that sleep() does not stop the thread
whereas interrupt stops the thread. While Kai's notes and
Hunt's mock exam says just the opposite.
Also waitforId/waitforData does not stop the thread but blocks.
However, all the mock exam includes that as answer which will
stop the thread.
Please advice me the answer which I should be choosen in
the exam.
Please suggest the answer for all the 10 situations given above.
Regards
Sanjay
 
Sanjay Mishra
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I am still looking for reply.
Will someone comment on this post.
Thanks
Regards
Sanjay.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic