[问答题] private static int size;
2021-07-13
[问答题] private static int size;
正确答案:size++; Outer.this.size++; Inner k=new Inner();
参考解析:本题主要考查内部类的概念,super,this关键字的用法。解答本题的关键是熟练掌握super,this关键字的用法。在本题中 size++;语句是访问局部变量size,Outer.this.size++;语句的功能是访问外部类的成员变量size,Inner K=new Inner();语句的功能是生成内部类Inner的对象K。
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
