-
The private access specifier is used to restrict the use of class member within the class.
-
Any member of the class declared with public access from anywhere in the program.
-
It can’t be accessed from outside the class.
-
It is also the default access specifier.
-
The data members are normally declared with a private access specifier.
-
It is because the data of an object is more sensitive.
-
The private access specifier is to protect the data member from direct access from outside the class.
-
These data members can only be used by the functions declared within the class.