employer cover photo
employer logo
employer logo

NCR Corporation

Désormais appelé NCR Voyix

Est-ce votre entreprise ?

Question d’entretien chez NCR Corporation

How does a given code example violate encapsulation principle (code describes a ListHandler object that adds or removes element from the list, and includes a getter and setter)

Réponse à la question d'entretien

Utilisateur anonyme

21 févr. 2019

If getter returns the list stored internallly, then whoever has the reference to the list can modify the list from outside the class.