Encapsulation refers to a set of language-level mechanisms or design techniques that group and control access to implementation details of a class, module or subsystem from other classes, modules and subsystems. For example, private variables in a class.