标签:swing timertask task worker static code 必须 rod time
子接口:RunnableFuture<V>, RunnableScheduledFuture<V>
实现类:AsyncBoxView.ChildState, ForkJoinWorkerThread, FutureTask, RenderableImageProducer, SwingWorker, Thread, TimerTask.
有一个 void run() 方法,所有实现类必须实现这个方法。
使用场景:
public class Bike implements Runnable { @Override public void run() { System.out.println("I am by biking"); } public static void main(String[] args) { Bike mybike = new Bike(); new Thread(mybike, "mybike").start(); System.out.println("Main..."); } }
标签:swing timertask task worker static code 必须 rod time
原文地址:https://www.cnblogs.com/Spider-spiders/p/9936809.html