您可以看到,字段可见性的规则和标记都与成员函数可见性的规则和标记一致。后者在上周讨论过。
As you can see, the rules and notations for field visibility are consistent with those for member function visibility, as discussed last week.
第一个是可见性标记(visibility marker),可以将字段、方法和类标记为公共的、受保护的、私有的或默认的可见性。
The first is a visibility marker that marks fields, methods, and classes for either public, protected, public, or default visibility.
包成员可以使用可见性修饰符来标记,以控制对成员的访问。
Package members may be marked with visibility modifiers to help control access to the member.
应用推荐