import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class Main {
public static void main(String args[]) throws Exception{
ExecutorService es = Executors.newFixedThreadPool(3);
Future f = es.submit(new Avg());
Future f2 = es.submit(new Factorial());
System.out.println(f.get());
System.out.println(f2.get());
es.shutdown();
}
}
class Avg implements Callable {
Avg() {
}
public Double call() {
return 0.0;
}
}
class Factorial implements Callable {
Factorial() {
}
public Integer call() {
return 1;
}
}