import javax.management.monitor.Monitor; class TraadSettInn implements Runnable{ private int tall; private MonitorArray monitor; public TraadSettInn(int tall, MonitorArray monitor){ this.tall = tall; this.monitor = monitor; } @Override public void run(){ boolean plass = monitor.settInn(tall); while(plass){ plass = monitor.settInn(tall); } System.out.println(tall + " er ferdig"); } }