1.使用Thread.stop()? 极力不推荐此方式,此函数不安全且已废弃,具体可参考Java API文档 2.设置终止标识,例如: import static java.lang.System.out; public class TestThread extends Thread { private boolean terminationFlag; public void run() { for (int i = 0; i != 10000000; ++i) { if (terminatio…