Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 8th, 2011  |  syntax: Java  |  size: 0.26 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }