title: Timer in Java Thread
body: <p>I have a thread which is in charge of doing some processes. I want make it so that these processing would be done every 3 seconds. I've used the code below but when the thread starts, nothing happens.
  I assumed that when I define a task for my timer it automatically execute the <code>ScheduledTask</code> within time interval but it doesn't do anything at all. 
  What am I missing?</p>
  
  <pre><code>class temperatureUp extends Thread 
  {
      @Override
      public void run()
      {
      TimerTask increaseTemperature = new TimerTask(){
  
          public void run() {
          try {
              //do the processing 
          } catch (InterruptedException ex) {}
          }
      };
  
      Timer increaserTimer = new Timer("MyTimer");
      increaserTimer.schedule(increaseTemperature, 3000);
  
      }
  };
  </code></pre>