File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes stop a thread from running 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 "stop a thread from running" Watch "stop a thread from running" New topic

stop a thread from running

Moya Green
Ranch Hand

Joined: Jan 24, 2002
Posts: 49
I am not quite sure about the following methods acting on threads, please correct me. Thank you!
which cannot directly stop a thread from executing?
1)call stop()//false
2)call wait() //false
3)call yield() // false
4)call notify() //true
5)call notifyAll() //true
6)call SetPriority //true
7)call start() on another Thread objeact //false
8)call read method on InoutStream object //false
9)exist from a synchronized block//true
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
I think 7 and 8 are also true.
I agree. Here's the link:
subject: stop a thread from running
It's not a secret anymore!