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
Better you have to use this method of thread,to stop it.
Thread.interrupt();
So that you can also save the state of thread.