import java.util.*; public class Main { public static void main(String[] args) { BankAccount b1 = new BankAccount("Account1"); BankAccount b2 = new BankAccount("Account2"); b1.setBalance(1000); b2.setBalance(200); b1.withdraw(700); b2.deposit(100); System.out.println(b1); System.out.println(b2); System.out.println("Is Account1 equal to Account2: " + b1.equals(b2)); HashMap map = new HashMap(); map.put(b1.hashCode(), b1); map.put(b2.hashCode(), b2); for (Object o : map.values()) { System.out.println(o); } for (Object o : map.keySet()) { System.out.println(o); } } }