When a thread is alive, how can I stop the thread? I have given like
if(thread.isAlive()){ thread.stop(); }
but the method stop is depr
Here's what the Java people have to say about why not to call thread.stop and what to do instead.
http://download.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html
The short answer is, you allow the thread entry point function to return.