Hi, I'm wrighting a program where i have to start a thread, then kill it by command and start again. Is there any way to do that? Is there anything like the depricated stop() method?
posted 14 years ago
Ilya, Once a thread starts and its run() method returns, that thread cannot be restarted. I'd guess that, if you are working with multiple threads, you probably want the functionality that is provided by the wait() and notify() methods. Check the API for more info on those methods, or do a search at this site. Hope that helps.