import java.util.concurrent.CountDownLatch; public class TacoTruck{ public static void main(String[] args){ Thread gr?nnsakTr?d = new Thread(new KuttGr?nnsakerTraad()); Thread kj?ttTr?d = new Thread(new StekKj?ttTraad()); Thread varmTr?d = new Thread(new VarmTortillaTraad()); gr?nnsakTr?d.start(); kj?ttTr?d.start(); varmTr?d.start(); try { gr?nnsakTr?d.join(); kj?ttTr?d.join(); varmTr?d.join(); System.out.println("Maten er serverert!"); } catch (InterruptedException e){ System.out.println("Main-tr?den ble avbrutt under joining, middagen er avlyst!"); System.exit(1); } } }