Encapsulation means combining data and functions into a single unit. In Object oriented programming, encapsulation is implemented by Class. Encapsulation is used to implement Data hiding (Infromation Hiding). Class consists of both the data and functions. For example: Student class combines data like(roll _no, name, class, address) and functions(input() and show()) into a single unit.