+3 votes
in Class 12 by kratos

Explain Data Hiding with respect to OOP.

1 Answer

+1 vote
by kratos
 
Best answer

Data hiding can be defined as the mechanism of hiding the data of a class from the outside world or to be precise, from other classes. Data hiding is achieved by making the members of the class private. Access to private members is restricted and is only available to the member functions of the same class. However, the public part of the object is accessible outside the class.

...