int withdraw(int amount) { if (amount > _balance) return -1; else { _balance -= amount; return 0; } }
void withdraw(int amount) throws BalanceException { if (amount > _balance) throw new BalanceException(); _balance -= amount; }
For more information see page 310 of Refactoring