+3 votes
in Class 12 by kratos

What is the significance of private, protected and public specifiers in a class?

1 Answer

+6 votes
by kratos
 
Best answer

A class groups its members into three sections: private, protected, and public. The private and protected members remain hidden from outside world. Thus through private and protected members, a class enforces data-hiding. The public members are accessible everywhere in a program.

...