//dit is de consumer, want de producer is de klant die blijft komen en de bediende handelt telkens 1 klan per 2 seconden public class Bediende extends Thread { public Winkel winkel; public Bediende(Winkel winkel) { super("Ik ben een bediende"); this.winkel = winkel; } public void run() { while(true) { String boodschap = winkel.get(); System.out.println(boodschap); try{ Thread.sleep(2000); } catch(InterruptedException ex) {} System.out.println("Thank you, come again"); } } }