X Tutup
# java.util.TimerTask类 - Java.util包 **java.util.TimerTask** class represents a task that can be scheduled for one-time or repeated execution by a Timer. ## 类声明 Following is the declaration for **java.util.TimerTask** class: ``` public abstract class TimerTask extends Object implements Runnable ``` ## 类构造函数 | S.N. | 构造函数 & 描述 | | --- | --- | | 1 | **protected TimerTask() ** This constructor creates a new timer task. | ## 类方法 | S.N. | 方法 & 描述 | | --- | --- | | 1 | [boolean cancel() ](http://www.yiibai.com/java/util/timertask_cancel.html) 此方法将取消此计时器任务。 | | 2 | [abstract void run() ](http://www.yiibai.com/java/util/timertask_run.html) 此方法表示要由该定时任务执行的动作。 | | 3 | [long scheduledExecutionTime() ](http://www.yiibai.com/java/util/timertask_scheduledexecutiontime.html) 此方法返回当前任务最近实际执行的安排执行时间。 | ## 方法继承 这个类从以下类继承的方法: * java.util.Object
X Tutup