SyntaxFix
Write A Post
Hire A Developer
Questions
If you are using at least Java 8 you can use method runAsync from class CompletableFuture
runAsync
CompletableFuture.runAsync(() -> {...});
If you need to return a result use supplyAsync instead
supplyAsync
CompletableFuture.supplyAsync(() -> 1);