public公开 protected 同包下可以访问,子类可以访问 缺省 同包 private私有,当前类中使用。 当某个数据只希望子类使用,使用protected修饰 类,只能用public和缺省修饰。