|
|
发表于 9-5-2008 10:56 PM
|
显示全部楼层
import java.util.Timer;
import java.util.TimerTask;
public class MyTimer extends TimerTask{
public static void main(String[] args) {
Timer t = new Timer();
t.schedule(new MyTimer(), 5000); //in milliseconds before task is to be executed.
}
public void run() {
System.out.println("this is wat i schedule to run!");
}
} |
|