Encapsulation is packing or combining two or more items in one unit. The concept of encapsulation is used in object oriented programming. Encapsulation is closely related to information hiding.
Class is an example of encapsulation, where various data elements and member functions are wrapped up together.