Module java.base
Package java.util

Class TimerTask

java.lang.Object
java.util.TimerTask
All Implemented Interfaces:
Runnable

public abstract class TimerTask extends Object implements Runnable
A task that can be scheduled for one-time or repeated execution by a Timer.

A timer task is not reusable. Once a task has been scheduled for execution on a Timer or cancelled, subsequent attempts to schedule it for execution will throw IllegalStateException.

Since:
1.3