how is a threads execution stopped in Java code example
Example: java how to stop a thread
Thread t = new Thread();
try {
//{...your thread code here...}
//at the end of the 'try{}' block..
t.interrupt();
} catch (InterruptedException e) {} //or whatever Exception your Thread will launch