I am working on a project in which I have multiple interface and two Implementations classes which needs to implement these two interfaces.
Suppose my first Interface is
A shorter version:
ExecutorService executor = ... // e.g. Executors.newFixedThreadPool(4);
Future> future = executor.submit(() -> testA.abc());
testB.xyz();
future.get(); // wait for completion of testA.abc()
To be noted that having to run something in parallel with nothing to be returned could be a sign of a bad pattern :)
Also, if you are in a Spring environment, you could use: https://spring.io/guides/gs/async-method/