public class StopThreaDemo {
public static void main(String args[]){
int in =0;
Thread t = new Thread(new StopDemo());
t.setDaemon(true);
t.start();
while(true){
if(in>=60){
System.out.println("over");
t.interrupt();
break;
}
System.out.println(Thread.currentThread().getName()+"..."+in++);
}