What do you mean by data encapsulation?
Data encapsulation is a method of binding data and code in single unit known as object and hiding all the implementation details of a class from the user. It stops unauthorized access of data and restricts the user to use the essential data only.