title: How to do an array of timers in java
body: <p>I know I am probably way off here, but I am trying to create a timer array so that mytimer[0] mytimer[1], mytimer[2], etc... all fire off at a different interval, with diffrerent events sent to a server. Any ideas? The for loop value of 6 is an organic number for testing purposes only. This number would later be decided base on a setting from the program's xml file.</p>
  
  <pre><code>Timer mytimers[] = new Timer[6]; 
  for(int i = 0;i &lt; 6;i++){
      final int mytime = i;
      mytimers[i].scheduleAtFixedRate(new TimerTask() {
  
          @Override
          public void run() {
              //do action
              sendData("Timer " + mytime + " fired");              
          }
      }, 10000, i*1000);
  }
  </code></pre>