logo - 刷刷题
下载APP
【简答题】

请回答以下程序中,注解部分的7个问题: public class ShowInnerClass { private static int testdata; private int data; /** * A method in the outer class */ public void m() { // Do something InnerClass instance = new InnerClass(); //question 7: can we modify the m variable using the next statemet? //m = 4; } // An inner class //question1: can we define InnerClass as static one? class InnerClass { //question2: can we add the next declaration? //static int temp; int m = 3; //question3: can we have the next declaration? private int data; /** * A method in the inner class */ public void mi() { // Directly reference data and method defined in its outer class //question4: if the answer of question3 is true, then what about the //next statement? how we refer to the data of outer class? data++; ShowInnerClass.this.data++; m(); testdata++; } //question5:can we nestly define class, what is its class name? class DeepInnerClass { public void mm() { } } //question6: can we define class in the method? public void ml() { class ClassInMethod { public void mm() { } } } } }

题目标签:问题程序
举报
参考答案:
参考解析:
.
刷刷题刷刷变学霸
举一反三

【单选题】宰后检疫的程序不包括

A.
头部检疫
B.
内脏检疫
C.
酮体检疫
D.
菌体检疫

【多选题】基于Internet的EDI存在的问题有()。

A.
安全问题
B.
网络营运的可靠性
C.
成本问题
D.
第三方认证问题

【单选题】心理咨询最突出的问题是()

A.
恐惧问题
B.
情绪问题
C.
青春期问题
D.
更年期问题
E.
世界观问题