blob: 9774e8484b57af9e89687bd4a2dd3857d60c68a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
public class AccountTest {
/**
* @param args
*/
public static void main(String[] args) {
Account a1 = new Account(); // Instantiation of 'Account' class
Account a2 = new Account(10.0);
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());
}
}
|