private class RunTimerTask extends TimerTask { public final void run() { int time = 0; int time1 = 5; int time2 = time+time1; t.set(1, " "+ ++count + " ",null); t.set(3, " "+ time2 + " ",null); } } 

There is a timer. I need to add a certain amount after the time expires. He just adds the same piece of code 1 because ++count how can I do that would add the number 3 for example.

  • 7
    Uh ... I tried to put missing commas in your text in every way, the meaning does not appear at any arrangement. - VladD
  • There is a timer, I need to add a certain amount after the time expires. he just adds the same piece of code 1 because ++ count how I would do to add the number 3 to the example.
  • Try count += 3 . - VladD
  • he says a mistake at all - zaqzaq
  • And how exactly did you write? Do you know the syntax of the language? - VladD


1 answer 1

t.set (1, "" + (count + = 3) + "", null);

I guess so should not give errors