+ 2
If the class members are private then is it still accessible to derived class?
7 Antworten
+ 9
No, private makes it inaccessible by other classes as well as derived classes. This is why we use protected, so other classes except for derived classes can't access it.
+ 7
No,because private members of a class are accessible only within the class no outside of the class
+ 4
You can only there with PUBLIC
+ 4
no we can't access the member if you are using private access specifiers ie they are bounded to that particular class only
0
exactly
0
No
0
No, but in you want to use members also in a derived class use the access modifier protected.