diff options
Diffstat (limited to 'java/05-simple-objects/AccountApp.java')
| -rw-r--r-- | java/05-simple-objects/AccountApp.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/java/05-simple-objects/AccountApp.java b/java/05-simple-objects/AccountApp.java new file mode 100644 index 0000000..a20f9fb --- /dev/null +++ b/java/05-simple-objects/AccountApp.java @@ -0,0 +1,22 @@ +public class AccountApp { + + /** + * @param args + */ + public static void main(String[] args) { + Account a1 = new Account(); // Instantiation of 'Account' class + Account a2 = new Account(); + + System.out.println(a1.getBalance()); + + a1.deposit(100.0); + System.out.println(a1.getBalance()); + + a1.withdraw(50.0); + System.out.println(a1.getBalance()); + + a2.deposit(100.0); + System.out.println(a2.getBalance()); + } + +} |
