rendered paste bodypublic class Cashier implements Runnable { private CustomerLine line; private static boolean allDoneYet; public Cashier(CustomerLine line) { this.line = line; allDoneYet = false; } public void run() { while (!allDoneYet) { if (!line.isEmpty()) { Customer c = line.dequeue(); c.process(); if (allDoneYet = c.isLast()) notifyAll(); } else Thread.wait(); } }}Compile: parker@chroma ~/Desktop/Store $ !javacjavac *.javaCashier.java:19: non-static method wait() cannot be referenced from a static context else Thread.wait();