📄 mytaskmain.java
字号:
import java.util.Timer;public class MyTaskMain{ // This is the main method that starts the Timer. Notice we did not have to // call a start method on the Timer. It actually associates a thread with // each Timer instance public static void main(String[] args) { Timer timer = new Timer(); MyTask task = new MyTask( 5, timer ); // Schedule the task to run every 3000 millisecs or 3 seconds starting // right from the beginning. timer.schedule( task, 0, 3000 ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -