Encapsulation means it is a mechanism of wrapping up of data (variables) and methods together as a single unit is know as Encapsulation.
In encapsulation, the variables of a class will be hidden from other classes, and it can be accessed through the methods of their current class. Therefore, it is also known as data hiding.