| Author |
Thread question
|
Animesh Shrivastava
Ranch Hand
Joined: Jul 19, 2004
Posts: 298
|
|
In the khalid mughal's mock exam section, there is a question: Select the one correct answer. 1) The run() method that the thread is executing ends 2) The call to the start() method of the Thread object returns 3) The suspend() method is called on the Thread object 4) The wait() method is called on the Thread object 1 is the correct answer I agree 1 is the correct answer but why couldnt 2 be also the correct answer? Please anyone explain me. Thanks
|
 |
Stephen C Johnson
Greenhorn
Joined: Mar 07, 2005
Posts: 7
|
|
Interesting answers. Question please?
|
 |
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
|
|
I'd say they are all correct answers to some question. As this is not Jeopardy I'm not going to guess at what those questions actually are.
|
42
|
 |
Animesh Shrivastava
Ranch Hand
Joined: Jul 19, 2004
Posts: 298
|
|
Sorry for the wrongly posted question, here is the right one: Under which circumstance will a thread stop Select the one correct answer. 1) The run() method that the thread is executing ends 2) The call to the start() method of the Thread object returns 3) The suspend() method is called on the Thread object 4) The wait() method is called on the Thread object The correct answer given is 1, i expected 2 to be the correct one
|
 |
Peter Rooke
Ranch Hand
Joined: Oct 21, 2004
Posts: 779
|
|
|
In answer two, the start() method has returned; but another thread has been started to execute the run() method.
|
Regards Pete
|
 |
 |
|
|
subject: Thread question
|
|
|