線程創(chuàng)建與終止
線程創(chuàng)建
Thread類與Runnable接口的關(guān)系
public interface Runnable { public abstract void run(); } public class Thread implements Runnable { /* What will be run. */ private Runnable target; ...... /** * Causes this thread to begin execution; the Java Virtual Machine * calls the <code>run</code> method of this thread. */ public synchronized void start() {......} ...... @Override