Java TimerTask Class

The java TimeTask class is used to represent a task that can be scheduled for one-time or repeated execution by a Timer.

SNMethodDescription
1run()It is used to cancel this timer task.
2cancel()It is used to represent the action to be performed by this timer task.
3scheduledExecutionTime()It is used to return the scheduled execution time of the most recent actual execution of this task.