标签:new cep static system exec LEDE package com 实现
package com.cxy.juc; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; class MyThread implements Callable<Integer> { @Override public Integer call() throws Exception { return 1024; } } public class CallableDemo { public static void main(String[] args) throws ExecutionException, InterruptedException { FutureTask<Integer> futureTask =new FutureTask(new MyThread()); new Thread(futureTask,"a").start(); Integer reslut =futureTask.get(); System.out.println(reslut); } }
标签:new cep static system exec LEDE package com 实现
原文地址:https://www.cnblogs.com/xiufengchen/p/11665813.html