public synchronized void withdraw(double amount) { while (balance < amount) //wait for balance to grow . . . }