wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes about thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "about thread" Watch "about thread" New topic
Author

about thread

dx wu
Ranch Hand

Joined: Apr 28, 2002
Posts: 60


this problem confuse me,and cloud someone help me? thanks


good good study , day day up!
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I think A & E is the answer . I am sure about E .
dx wu
Ranch Hand

Joined: Apr 28, 2002
Posts: 60
Cloud explain the reason to me?
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
yaa sure ...
about E , we are just setting priority of thread ... so this method ( setPrority ) can't stop a thread to execution .

and other 3 except A are looking valid reason to stop execution ...
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
I would go with A and C.

Releasing a lock by exiting a synchronized block and releasing wait with notify might allow a higher priority thread to preempt the running thread, but that is indirect and conditional.

Setting another runnable thread to a higher priority will certainly cause one's own thread to stop running.


Mike Gershman
SCJP 1.4, SCWCD in process
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Mike may be right ... sorry
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: about thread
 
Similar Threads
stoping execution.
question about thread
Thread
Question on exercise about Thread(2)
The conflicting answers for these 2 questions!