What is the order in which multiple thenAccept blocks of a CompletableFuture are executed
<p>So I have a method that returns a <code>CompletableFuture</code>. Before returning, this method adds a block with <code>thenAccept</code> which is executed after the <code>CompletableFuture</code> completes.</p>

<p>The caller of this method also adds another block with <code>thenAccept</code>. Obviously this can go on with multiple chained calls.</p>

<p>In what order are the <code>CompletionStage</code> returned by the <code>thenAccept</code> invocations executed? Is it guaranteed to be the order in which they are added? If not, how can one guarantee that they are executed in the order in which they are added?</p>

<p>PS: I am asking this based on my own experience with <code>CompletableFuture</code> and this <a href="http://www.ceus-now.com/order-of-multiple-thenaccept-blocks-in-completablefuture/" rel="noreferrer">article</a></p>