employer cover photo
employer logo
employer logo

NCR Corporation

Oggi denominata NCR Voyix

Questa è la tua azienda?

Domanda di colloquio di 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)

Risposta di colloquio

Anonimo

21 feb 2019

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