Skip to content

Instantly share code, notes, and snippets.

@achambers
Created July 27, 2011 17:46
Show Gist options
  • Save achambers/1109960 to your computer and use it in GitHub Desktop.
Save achambers/1109960 to your computer and use it in GitHub Desktop.
insufficient_funds_java
public Account withdraw(long accountNumber, BigDecimal withdrawalAmount) {
Account account = accountDao.get(accountNumber);
if(!account.hasSufficientFunds(withdrawalAmount)) {
throw new InsufficientFundsException();
}
//some code here
return account;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment