title: How to add loop timer in Java?
body: <p>How to loop this timer? I want to print every 1 second.</p>
  
  <pre><code>Timer timer = new Timer();
  timer = new Timer(false);
  for (int i = 0; i &lt; 10; i++) {
     timer.schedule(new TimerTask() {
        @Override
        public void run() {
           i--;
           System.out.println("Java " + i);
        }
     }, 0, 1000);
  }
  </code></pre>