不断判断的循环体内加入
Thread.sleep(10)
阻塞线程一下

解决方案 »

  1.   

    你可以用Timer类啊.
    比如Timer.shedule(TimeTask task,long delay)
    你只要实现出TimeTask,并且指定delay的值,就差不多可以实现你想要的功能.
    你可以详细看一下Timer类.
      

  2.   

    不好意思,TimerTask怎么实现?继承下来重写run()?它没有start()方法啊。文档没有看懂……
      

  3.   

    你直接继承TimerTask类就行了,在run()方法中实现你像要的功能,并且TimerTask已经实现了Runnable接口,你将实现了的类产生一个对象传入Timer.shedule(TimerTask,time)中就可以了,
    你看看Timer.schedule()的说明吧!
      

  4.   

    Timer类可以实现
    线程也可以实现
      

  5.   

    感觉如2楼所说,是个简单实用的方法:
    try
    {
    for (int i=0;i<60;i++)
    {
       system.out.print("倒记时" + (60-i));
       Thread.sleep(1000);
    }
    }
    catch(InterruptedException e){}