Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- Person p1 = new Person("Ivan",20);
- p1.AddBankAccount(new BankAccount(10,1000));
- p1.AddBankAccount(new BankAccount(44,1000));
- p1.AddBankAccount(new BankAccount(14,5555));
- System.out.println(p1.getBalance());
- System.out.print(p1.getAccountWithMostMoney(p1));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement