title: What is the difference between 'CompletionStage' and 'CompletableFuture'
body: <p>I have seen an example in each of them, but I need to know exactly what is the difference in deep, Because sometimes I think I can use both of them to get the same result, So I want know so that I can choose the correct one?</p>
  
  <p>What is the benefit of using each of them?</p>
  
  <p>Like this example both works:</p>
  
  <pre><code>public CompletionStage&lt;Result&gt; getNextQueryUUID() {
      return CompletableFuture.supplyAsync(() -&gt; {
          String nextId = dbRequestService.getNextRequestQueryUUID();
          return ok(nextId);
      }, executor);
  }
  
  
  public CompletableFuture&lt;Result&gt; getNextQueryUUID() {
      return CompletableFuture.supplyAsync(() -&gt; {
          String nextId = dbRequestService.getNextRequestQueryUUID();
          return ok(nextId);
      }, executor);
  }
  </code></pre>
  
  <blockquote>
    <p>This example run in <code>Play framework</code>.</p>
  </blockquote>