Ad
Code
Diff
  • class Account {
      
      private int balance = 0;
      
      void deposit(int amount){
        balance += amount;
      }
      
      void withdraw(int amount){
        balance -= amount ;
      }
      
      String getStatement() {
        return "" + balance; //Integer.toString(balance); //
      }
      
    }
    • class Account {
    • private int balance = 0;
    • void deposit(int amount){
    • balance += amount;
    • }
    • void withdraw(int amount){
    • balance = 400;
    • balance -= amount ;
    • }
    • String getStatement() {
    • return "" + balance; //Integer.toString(balance); //
    • }
    • }