去掉try和catch(InterruptedException ex)!
{
}

解决方案 »

  1.   

    mt1.start();
    mt2.start();
     我在中间加上mt1.sleep(1000);就没有报错
      

  2.   

    start()不产生异常的,而SLEEP()就可能产生异常,所以才会有你说的情况啊.
    清楚了吗?
      

  3.   

    InterruptedException异常是针对sleep的,有sleep的地方必需捕捉InterruptedException或其父类。
      

  4.   

    使用sleep会有可能抛出InterruptedException所以要使用try{}catch{}捕获
      

  5.   

    public class InterruptedExceptionextends Exception Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.start()也会导致异常!上面的有些家伙人云亦云!白痴行为!
    start public native synchronized void start() Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread. The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
    Throws:IllegalThreadStateException - if the thread was already started.