Make a simple timer in Java

后端 未结 3 693
离开以前
离开以前 2021-01-31 13:06

I can\'t seem to figure out how to make a simple timer in java. All I need it to do is just display time, really. So just a start method, and it keeps counting up like 0:00, 0:0

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 13:33

    You can either use Timer class from java.util or another way, which is more complicated, is with Threads. Timer also has thread action, but it's pretty easy to understand to use it.

提交回复
热议问题