public class TacoPreparation { public static void main(String[] args) { //lage tråder Thread vegThread = new Thread(new ChopVegetablesTask()); Thread cookMeatThread = new Thread(new CookMeatTask()); Thread tortillaThread = new Thread(new HeatTortillasTask()); //starte tråder vegThread.start(); cookMeatThread.start(); tortillaThread.start(); //joine tråder try { vegThread.join(); cookMeatThread.join(); tortillaThread.join(); System.out.println("All tasks are completed! Serve the tacos!"); } catch (InterruptedException e) { } } }