Encapsulation is one of the four OOP concepts. It is a way of wrapping variables and code on data as a single unit. The class variables are hidden from other classes, and can be accessed only through their current class. Therefore, this method is also called data hiding.

BY Best Interview Question ON 13 Jan 2019