I am not getting, Suddenly from where this concept of Timer has come. We were discussing Executors and the Thread pool.
The Timer
class helps us set Timer
on our tasks, and it is used in class TimerTask
for scheduling. We can give different threads different times to run. There are lots of things to learn in multithreading, and TmerTask
is one of them.
If you still have any queries, please feel free to ask. Thank you.