0
So, "protected" encapsulation mode is less restrictive than "private", isn't it?
2 Réponses
0
Protected only lets the current class and inherited classes to use it.
0
private allows the variable/function to be accessed only in the particular block of the program however protected allows the variable/function to be accessed in the current and inherited classes.