2mp.co 

Welcome to the matrix

What is encapsulation?

Definition: The action of enclosing something in or as if in a capsule.

Encapsulation is a programming language paradigm.

It is one of the 4 pillars in Object Oriented Programming.

It is used to refer to one of two related, but distinct notions and sometimes to the combination of;
• A language mechanism for restricting direct access to some of the object's components.
• A language construct that facilitates the bundling of data with the methods (or other functions) operating on that data.