@@ -0,0 +1,802 @@
+import java.util.concurrent.Callable; %0Aimport java.util.concurrent.FutureTask; %0A%0Apublic class T9_CallableThread implements Callable%3CInteger%3E %7B%0A%0A%09public Integer call() %7B%0A%09%09int i = 0;%0A%09%09for(; i%3C6; i++) %7B%0A%09%09%09System.out.println(Thread.currentThread().getName() + %22:%22 + i);%0A%09%09%7D%0A%09%09return i;%0A%09%7D%0A%0A%09public static void main(String %5B%5D args) %7B%0A%09%09try %7B%0A%09%09%09T9_CallableThread ct = new T9_CallableThread();%0A%09%09%09FutureTask%3CInteger%3E ft = new FutureTask%3CInteger%3E(ct);%0A%09%09%09for(int i=0; i%3C5; i++) %7B%0A%09%09%09%09System.out.println(Thread.currentThread().getName() + %22-%22 + i);%0A%09%09%09%09if(i == 2) %7B%0A%09%09%09%09%09new Thread(ft).start();%0A%09%09%09%09%09System.out.println(ft.isDone());%0A%09%09%09%09%09Thread.sleep(1000);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09System.out.println(%22return:%22 + ft.get());%0A%09%09%09System.out.println(ft.isDone());%0A%09%09%7D catch(Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%7D

add callable futuretask test