静态内部类 创建java类中类出现is not an enclosing class java静态与非静态区别

1、静态内部类可以在外部类的外部直接通过new A.B()进行实例化,内非静态内部类,需要先A a=new A() A.B b=a.new B()方式进行实例化

##参考资料

创建java类中类出现is not an enclosing class

java静态与非静态区别

猜你喜欢

转载自www.cnblogs.com/dancser/p/12616105.html