Timer is a timer tool used to schedule the execution of specified tasks in a background thread. It can be scheduled to execute a task once or repeatedly.
TimerTask is an abstract class whose subclasses represent a task that can be scheduled by Timer.