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
Joined: Jul 08, 2000
Hello Friends, I am still looking for reply. Will someone comment on this post. Thanks Regards Sanjay.