例如,Groovy不要求使用分号,变量类型和访问修饰符也是可选的。
For example, Groovy doesn't require semicolons, and it makes variable types and access modifiers optional.
请注意,如果结构本身具有限制性更高的访问级别,这会自动限制对其成员的访问,即使您使用访问修饰符来调整其成员的访问级别也是如此。
Note that if the structure itself has a more restricted access level, this automatically restricts access to its members, even if you adjust their access levels with the access modifiers.
包成员可以使用可见性修饰符来标记,以控制对成员的访问。
Package members may be marked with visibility modifiers to help control access to the member.
应用推荐