class A implements Callable<T>{
public Integer call() throws Exception {
}
}
------解决方案--------------------
不好意思没写完。
public class Test {
public static void main(String[] args){
A a=new A();
FutureTask<Integer> task=new FutureTask<Integer>(a);
Thread thread=new Thread(task);
thread.start();
task.get();
}
}
class A implements Callable<T> {
@Override
public T call() throws Exception {
return null;
}
}