I am trying to chain the calls/results of the methods to the next call. I get compile time error methodE because if am not able to get the reference of objB from the previou
You could store intermediate CompletableFuture in a variable and then use thenCombine:
CompletableFuture futureA = CompletableFuture.supplyAsync(...)
.thenApply(...)
.thenApply(...);
CompletableFuture futureB = futureA.thenApply(...);
CompletableFuture futureC = futureA.thenCombine(futureB, service::methodE);
objC = futureC.join();