I was looking at java.util.Timer class and there is no possibility to cancel an
JavaFAQ Home » General Java
I was looking at java.util.Timer class
and there is no possibility to cancel an
individual task. I have to cancel whole Timer with all my scheduled tasks...
What is solution?
The solution is in your question you could develop a subclass of Timer that
stores a list of all scheduled TimerTask instances. Then retrieve the instance
that you want to cancel:
TimerTask  tasks =
tip based on SUN's forum answer
Printer Friendly Page
Send to a Friend
Search here again if you need more info!