import java.util.concurrent.CountDownLatch; public class TacoPreparation { public static void main(String[] args) { CountDownLatch latch = new CountDownLatch(2); Thread vegetableThread = new Thread(new ChopVegetablesTask(latch)); Thread meatThread = new Thread(new CookMeatTask(latch)); Thread tortillaThread = new Thread(new HeatTortillasTask(latch)); vegetableThread.start(); meatThread.start(); tortillaThread.start(); } }