static nested classes 静态嵌套类
Nested Classes and Interfaces 嵌套的类别和介面
nested top-level classes 嵌套顶级类
Also note that class definitions must appear at the top level of a module, meaning they cannot be nested classes (classes defined inside other classes or functions).
另外要注意,类定义必须出现在模块的最顶层,这意味着它们不能是嵌套的类(在其它类或函数中定义的类)。
The protected modifier cannot be used for classes at package scope, but it can be used for nested classes.
受保护的修饰符不能对包范围的类使用,但可以对嵌套的类使用。
If a class has one or more private constructors and no public constructors, other classes (except nested classes) cannot create instances of this class.
如果类具有一个或多个私有构造函数而没有公共构造函数,则其他类(除嵌套类外)无法创建该类的实例。
应用推荐