Bank of America interview question

How can you achieve encapsulation in a class?

Interview Answer

Anonymous

28 Nov 2012

My answer was to make your instance variables private and to set getters, but she expected me to also say about cloning the object and returning a clone of the object instead of the actual object.