/** * Make a withdrawal from this account * @param withDrawAmount amount to withdraw in pennies */ public synchronized void withdraw( long withdrawAmount ) throws BankingException { if ( withdrawAmount < 0 ) { throw new BankingException( "Negative withrawals should be handled as corrections or deposits" ): } if ( balance < withdrawAmount ) { throw new BankingException( "Insufficient funds" ); } this.balance -= withDrawAmount; }