I want to call one method asynchronous and when it finishes, call other function.
What I did is:
CompletableFuture.supplyAsync(lab::startProduction)
.thenApplyAsync(this::productFinalized);
and it work! but my problem now is: I need to pass n parameter to the startProduction.
startProduction(long timer)
And I don't know which is the best way/How to do that.
Thanks.