import java.util.concurrent.CyclicBarrier; class MinTraad implements Runnable{ private CyclicBarrier barrier; private int id; public MinTraad(CyclicBarrier barrier, int id){ this.barrier = barrier; this.id = id; } @Override public void run(){ System.out.println(id + "sier hei den f?rste gangen"); try{ barrier.await(); }catch(Exception e){ System.out.println(e); } System.out.println(id + "sier hei den andre gangen"); } }