title: How to return a value using CompletableFuture
body: <p>I created an example, i want to know how can I return a value using the <code>CompletableFuture</code> ? I also changed the <code>CompletableFuture&lt;Void&gt; exeFutureList</code> to be <code>CompletableFuture&lt;Integer&gt; exeFutureList</code> but eclipse always suggest to 
  set it back to Void.</p>
  
  <p>Please let me know how to return value using CompletableFuture.</p>
  
  <p><strong>Code</strong>:</p>
  
  <pre><code>    public class MainClass {
  
      static ExecutorService exe = null;
      static CompletableFuture&lt;Void&gt; exeFutureList = null;
  
      public static void main(String[] args) {
          exe = Executors.newFixedThreadPool(1);
          exeFutureList = CompletableFuture.runAsync(new RunClass(8), exe);
      }
  
      static class RunClass implements Runnable {
  
          private int num;
  
          public RunClass(int num) {
              // TODO Auto-generated constructor stub
              this.num = num;
          }
  
          public void run() {
              // TODO Auto-generated method stub
              this.num = this.num + 10;
          }
  
      }
  }
  </code></pre>