private void cancelTimer(){
  if (timer != null) {
    timer.cancel();
    timer.purge();
    timer=null;
  }
}

private void cancelTimer ( ) { if ( timer != null ) { timer . cancel ( ) ; timer . purge ( ) ; timer = null ; } }
cancel timer posting empty values .
