I have to do the timertask in java. The scenario is: I have to schedule a task for some delay intially. If i have clicked a button it will cancel the current Timer and then it will reschedule it. How to implement it in java?
when i have used the cancel()
i can not access the timer again. that is i can not reuse that object. i have declared the Timer
and Timertask
as static.
Thanks in Advance.