Mock2 Question 22)
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?
answer: 1) 2) 3)
whether 2) is right? If in a time-sliced scheduling, it can't the answer, but in a preemptive scheduling, it is the answer. Because here does not point out the scheduling , I think 2) should not be selected. Do you think so?
with many thanks!