强制终止
package IO;
public class Test1 {
public static void main(String[] args) {
Thread thread= new Thread(new A());
thread.setName("123");
thread.start();//注意一定不要忘记启动线程
try {
Thread.sleep(1000*5);
} catch (InterruptedException e) {
e.printStackTrace