already encapsulated inside the class
Why getters and setters play the major role in data hiding??
Because typically there is logic around what those values can be — and your setters/getters can do validation logic.
Обсуждают сегодня