@@ -0,0 +1,1421 @@
+import java.util.concurrent.*;%0A%0A/**%0A * Created by %E6%9D%8E%E6%81%92%E5%90%8D on 2017/6/8.%0A */%0Apublic class HowToCreateThread %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        method1();%0A        method2();%0A        method3();%0A    %7D%0A%0A    //%E7%BB%A7%E6%89%BFjava.lang.Thread%0A   public static void method1()%7B%0A       class Task extends Thread%7B%0A%0A           @Override%0A           public void run() %7B%0A               System.out.println(Thread.currentThread().getName() +%22 Started%22);%0A           %7D%0A       %7D%0A%0A       new Task().start();%0A   %7D%0A    //%E5%AE%9E%E7%8E%B0 java.lang.Runnable%0A   public static void method2()%7B%0A       class Task implements Runnable %7B%0A%0A           @Override%0A           public void run() %7B%0A               System.out.println(Thread.currentThread().getName() +%22 Started%22);%0A           %7D%0A       %7D%0A%0A       new Thread(new Task()).start();%0A   %7D%0A    //%E5%AE%9E%E7%8E%B0 java.util.concurrent.Callable%0A    public static void method3()%7B%0A        class Task implements Callable%7B%0A%0A            @Override%0A            public Object call() throws Exception %7B%0A                System.out.println(Thread.currentThread().getName() +%22 Started%22);%0A                return %22invoke finished%22;%0A            %7D%0A        %7D%0A%0A        ExecutorService es = Executors.newFixedThreadPool(1);%0A        Future future = es.submit(new Task());%0A        try %7B%0A            System.out.println(future.get());%0A        %7D catch (InterruptedException%7CExecutionException e) %7B e.printStackTrace();%7D%0A%0A        es.shutdown();%0A%0A    %7D%0A%0A%7D%0A

add > how to create thread