newbie's question about thread function
From: Hardy (yhang_wang_at_hotmail.com)
Date: 06/25/04
- Next message: Hardy: "Re: newbie's question about thread function"
- Previous message: Xavier Tarrago: "Re: Sleep in Java"
- Next in thread: Hardy: "Re: newbie's question about thread function"
- Reply: Hardy: "Re: newbie's question about thread function"
- Reply: Oscar kind: "Re: newbie's question about thread function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Jun 2004 16:36:29 +0800
there's a certification question like below, the answer is A&E.
which two cannot directly cause a thread to stop executing?
A.calling the yield method
B.calling the wait method on an object
C.calling the notify method on an object
D.calling the notifyAll method on an object
E.calling the start method on another thread object
the api book says: yield public static void yield()Causes the currently
executing thread object to temporarily pause and allow other threads to
execute.
then why A should be selected?
And how about the notify* method? can it DIRECTLY cause a thread to stop
executing?
thanks:)
- Next message: Hardy: "Re: newbie's question about thread function"
- Previous message: Xavier Tarrago: "Re: Sleep in Java"
- Next in thread: Hardy: "Re: newbie's question about thread function"
- Reply: Hardy: "Re: newbie's question about thread function"
- Reply: Oscar kind: "Re: newbie's question about thread function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|