class TelleTraad implements Runnable{ private int id; private Monitor monitor; public TelleTraad(int id, Monitor monitor){ this.id = id; this.monitor = monitor; } @Override public void run(){ boolean fortsett = monitor.settInnTall(id); while(fortsett){ fortsett = monitor.settInnTall(id); } } }