public static void main(String[] args) throws ExecutionException, InterruptedException { ExecutorService executorService = Executors.newFixedThreadPool(4); Future future = executorService.submit(new Callable<Object>() { @Override public Object call() throws Exception { System.out.println("Asynchronous Callable"); return "Callable Result"; } }); System.out.println("future.get() = " + future.get());}
Sign in to make a reply
不正经的二愣子