What can cause a thread to stop executing? 1) The program exits via a call to System.exit(0); 2) Another thread is given a higher priority 3) A call to the thread's stop method. 4) A call to the halt method of the Thread class the correct answer given is 1,2,4 I understand 1,2 can come.But how option 3.the stop()method have deprecated.
(2) Another thread is given a higher priority. I don't think by assigning high priority will let other threads to stop. Correct answer in my opinion : 1 & 3. And regarding (4) I am not clear. [This message has been edited by Pratap Reddy (edited January 08, 2001).]
Pratap, If the application is running a system that uses 'time-slicing' a higher priority thread may pre-empt a lower priority thread; causing it to stop. There is no method Thread.halt() Hope that helps. ------------------ Jane The cure for boredom is curiosity. There is no cure for curiosity. -- Dorothy Parker