previous | start | next

Answers

  1. The timer needs to call some method whenever the time interval expires. It calls the actionPerformed method of the listener object.
  2. It depends. The method is called once per second. The first eleven times, it prints a message. The remaining times, it exits silently. The timer is only terminated when the user quits the program.


previous | start | next