import java.util.concurrent.CountDownLatch; class VarmTortillaTraad implements Runnable{ @Override public void run(){ try { System.out.println("Varmer opp tortilla"); Thread.sleep((int)(Math.random() * 3000)); System.out.println("Tortilla varmet opp"); } catch (InterruptedException e){ System.out.println("Tortilla-oppvarming ble avbrutt"); System.exit(1); } } }