The-definition.com

Definition

Encapsulation

Encapsulation or Data hiding or Information hiding.

In Object-oriented Programming Encapsulation is a technique to hide or restricted the access to the properties and behaviours of an object.

Also,

Encapsulation  is a process of wrapping code and data together into a single unit, for example a capsule in which mixed of several medicines.

Encapsulation mechanism keeps the data and the code safe from external interference.

Example :

Access restriction to the properties and methods by using the keywords private, public, protected in a class.

Webster Dictionary Meaning

1. Encapsulation
- The act of inclosing in a capsule; the growth of a membrane around (any part) so as to inclose it in a capsule.
Share it:  Cite

More from this Section

  • Object
    An object in object-oriented programming is a complex data structure along with ...
  • Object-Oriented Programming
    Object-oriented programming (OOP) is defined as a concept of programming based on objects in ...
  • Abstraction
    Abstraction is one of the features of Object-oriented Programming ...
  • Procedural programming
    Procedural programming is a concept of programming that specifies a ...
  • C++ Programming Language
    C++ an Object-Oriented Programming language developed by Bjarne Stroustrup at Bell Laboratories ...