What is the difference between protected and private members of a class?
Answers (1)
Private visibility: A member which is declared as private and can be accessed only in class. It cannot be accessed outside the class.
Protected visibility: A member that can be accessed inside the class as well as inside its sub-class only.