Domanda di colloquio di Bank of America

How can you achieve encapsulation in a class?

Risposta di colloquio

Anonimo

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.