Encapsulation (computer programming)
= Encapsulation (computer programming)
{wiki=Encapsulation_(computer_programming)}
Encapsulation is a fundamental principle of object-oriented programming (OOP) that involves bundling the data (attributes) and methods (functions) that operate on that data into a single unit called a class. It also restricts direct access to some of the object's components, which is a means of preventing accidental interference and misuse of the methods and data.