Вызов нескольких методов, и я хочу вызвать их одновременно, которые должны ждать завершения друг друга.
else {
PricingFromS4Request pricingRequest = new PricingFromS4Request();
ProductFromS4Request productRequest = new ProductFromS4Request();
PricingFromS4ServiceImpl service = new PricingFromS4ServiceImpl();
//Create 1 thread for below line
pricingRequest = service.createS4PricingRequest(ABeanObject, SomeArrayList);
//Create 1 more thread for below line
productRequest = service.createS4ProductRequest(SomeList);
//Send pricingRequest and productRequest into another method
SomeMethod(pricingRequest,productRequest);
}
Невозможно поместить две строки в поток