[Edit]
+
0
-
0
java return result from runnable
1 2 3 4 5 6 7 8 9 10 11// you can use Callable and submit the task to thred pool // eg: ExecutorService pool = Executors.newFixedThreadPool(5); // java.util.concurrent.Callable Callable<Integer> task = new Callable<Integer>() { @Override public Integer call() throws Exception { // some calculations here return null; } };