Answers for "scheduleatfixedrate"

0

scheduleatfixedrate

import java.util.*;  
public class JavaTimerScheduleAtFixedRateExample1 {  
   public static void main(String[] args) {  
// creating timer task, timer  
Timer t = new Timer();  
TimerTask tt = new TimerTask() {  
    @Override  
    public void run() {  
       for(int i=1; i<=10;i++)  
        {  
        System.out.println("Task Timer on Fixed Rate");  
        }  
    };  
};  
t.scheduleAtFixedRate(tt,500,1000);    
   }  
}
Posted by: Guest on June-08-2021

Code answers related to "scheduleatfixedrate"

Browse Popular Code Answers by Language