title: How to determine whether the Timer task has completed
body: <p>I have this following code : </p>
  
  <pre><code>Timer timer = new Timer();      
  TimerTask task = new TimerTask() {
  
      @Override
      public void run() {
          // TODO Auto-generated method stub
      }
  };
  
  timer.schedule(task, 10000);//execute after 10 seconds
  </code></pre>
  
  <p>Can we determine whether the task is already executed by the timer or is still due?</p>