Is C++ access specifier called protected is similar to Java’s?The java access specifier ‘protected’ is placed proceeding the member of the class and the access control is applicable only for that particular definition.
It is a distinct contrast to C++. In C++ the protected access specifier controls all the definitions, such as methods, variables etc, until another access specifier comes along.
|