CompletableFuture: Chaining

This lesson discusses how to chain Completable Futures.

We'll cover the following...

Until now, we have looked at how to create a CompletableFuture and how to add callbacks.

One more interesting thing that we can do is combine CompletableFuture instances in a chain of computation steps. Suppose we want to get some data from a service and save it to the database. We can write two CompletableFuture instances and chain them together. The first instance will complete and share its result to the second instance.

There are two methods ...