站点图标 度崩网-几度崩溃

Inner Class和Static Nested Class的区别?

Inner Class:内部类

//内部类的创建语法
Outer outer = new Outer();
Outer.Inner inner = outer.new Innner();

 

Static Nested Class:静态嵌套类

//静态内部类创建语法
Outter.Inner inner = new Outter.Inner();