Java Timer purge() MethodThe purge() is the method of Timer class. It is used to cancel the tasks present in the TimerTask Chain. SyntaxReturnThis method returns the number of tasks removed from the queue. Example 1Test it NowOutput: Task is on Task is on Task is on Task is on Task is on Task is stop purge value of Task:0
Next TopicJava Timer
|