嵌套类(nested class):定义在一个类中的类;
嵌套类根据分俩种静态的和非静态的:静态的叫做静态嵌套类(static nested class),非静态的叫做内部类(inner class)
class OuterClass {
...
static class StaticNestedClass {
...
}
class InnerClass {
...
}
}
嵌套类(nested class):定义在一个类中的类;
嵌套类根据分俩种静态的和非静态的:静态的叫做静态嵌套类(static nested class),非静态的叫做内部类(inner class)
class OuterClass {
...
static class StaticNestedClass {
...
}
class InnerClass {
...
}
}