Hello,
I have found invariably 1 or more questions in all
the mock exams 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.
I am consolidating all the choices.
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
stops the thread.
Please advice me the answer which should be choosen in
the exam.
Please suggest the answer for all the 10 situations given above.
Regards
Sanjay
PS: This is a repost. Moderators please excuse me and help
me in getting the answer.