rt

解决方案 »

  1.   

    调用Thread的start()方法,start()会自动调用线程的run()方法
      

  2.   


    class ThreadTest extends Thread{
    public void run(){
    while(true)
    {
    System.out.println("I'm running")
    }
    }
    }
    public class ThreadMain { public static void main(String[] args) {
    ThreadTest tt=new ThreadTest();
    tt.start();//内部去调用run()
    }
    }
      

  3.   

    run();
    线程的操作都写到run里面
      

  4.   

    写到run()啊,不过调用start(),
    因为一般要么是实现runnable接口(主要是重写run())或者是继承Thread
    但是前者一般也要封装(常以参数传递的形式来构造Thread)在Thread中,
    调用start()时,自然会调run()啊。
      

  5.   

    我们用java解决实际问题。欢迎有经验的java程序员加入我们的讨论,因人数接近上限,初级人员暂时不能加入,请谅解。QQ 群:3001581