protected的意义

只在类中能用,本来的类和继承他的类里面可以用,外面不能用,拥有protected变量的类的对象在类外面都不能用。

原文地址:https://www.cnblogs.com/qinqiu/p/6845948.html