Access specifiers decide the access rights for the statements or functions that tail it until the finish of class or another specifier is incorporated. Access specifiers choose how the members of the class can be accessed.
There are three types of specifiers
Public – The members declared as Public are accessible from outside the Class through an object of the class.
Protected – The members declared as Protected are accessible from outside the class BUT only in a class derived from it.
Private – These members are only accessible from within the class.
Regards,
Nitesh Bavishiya