public class CopyObject3 { public static void main(String[] args) { BankAccount a = new BankAccount( 123, "John", 1000 ); BankAccount b = new BankAccount( a ); /* ==================================== Let's do the experiment again.... ==================================== */ /* ---------------------------------- Print the values before the update ---------------------------------- */ System.out.println("Object a: " + a.convToString()); System.out.println("Object b: " + b.convToString()); b.deposit(444); // Update the COPY /* ---------------------------------- Print the values after the update ---------------------------------- */ System.out.println("Values after updating the copy b:"); System.out.println("Object a: " + a.convToString()); System.out.println("Object b: " + b.convToString()); } }