Encapsulation
Published on
Published on
Encapsulation is the process of hiding the internal implementation details of an object from the outside world. It is one of the four fundamental OOP concepts.
Encapsulation is achieved when each object keeps its state private, inside a class. Other objects don’t have direct access to this state. Instead, they can only call a list of public functions — called methods.