您可以使用检查变量来实现中断方法。
首先,使用易失性检查变量作为:
volatile boolean tostop = false; // Keep the initial value to be false
接下来,将您的线程定义为依赖于此变量。
Thread thread1 = new Thread(){ public void run() { while(!tostop) { -- Write your pre here -- } } }接下来定义在其中使用线程的函数:
public void ....{ //Interrupt pre tostop = true; thread1.sleep(300); // Give the thread sometime for cleanup //Use System.exit(0), if the thread is in main function.}希望这可以帮助。



