SHARE
TWEET

Untitled

a guest May 8th, 2011 55 Never
  1.  
  2. public class Account {
  3.         private int balance;
  4.  
  5.         public Account() {
  6.                 this.balance = 0;
  7.         }
  8.  
  9.         public void transfer(int amount) {
  10.                 this.balance += amount;
  11.         }
  12.  
  13.         @Override
  14.         public String toString() {
  15.                 return "Account (balance: " + balance + ")";
  16.         }
  17. }
RAW Paste Data
Top