Thread  thread = new Thread(th);
Thread  thread = new Thread(th);
Thread  thread = new Thread(th);
Thread  thread = new Thread(th);
Thread  thread = new Thread(th);
这样才是5个线程吧.....

解决方案 »

  1.   

    你只创建了一个线程,当然count只自增一次了,
      

  2.   

    public class Th implements Runnable {
       
      
      
      public void run()
      {  
        public int count=0;    while(count<5)
        {
          System.out.println("当前计数:"+count);
          count++;
          Thread.sleep(1000);
        }
      }
    }类TestTh.class文件:
    public static void main(String args[]) throws InterruptedException {
        Th th = new Th();
        Thread  thread = new Thread(th);
        thread.start();
    }