niusouti.com

11.publicstaticvoidmain(String[]args){12.Integeri=uewInteger(1)+newInteger(2);13.switch(i){14.case3:System.out.println(”three”);break;15.default:System.out.println(”other”);break;16.}17.}Whatistheresult?()A.threeB.otherC.Anexceptionisthrownatruntime.D.Com

题目

11.publicstaticvoidmain(String[]args){12.Integeri=uewInteger(1)+newInteger(2);13.switch(i){14.case3:System.out.println(”three”);break;15.default:System.out.println(”other”);break;16.}17.}Whatistheresult?()

A.three

B.other

C.Anexceptionisthrownatruntime.

D.Compilationfailsbecauseofanerroronline12.

E.Compilationfailsbecauseofanerroronline13.

F.Compilationfailsbecauseofanerroronline15.


相似考题
参考答案和解析
参考答案:A
更多“publicstaticvoidmain(String[]args){12.Integeri=uewInteger(1)+newInteger(2);13.switch(i) ”相关问题
  • 第1题:

    publicclassFoo{publicstaticvoidmain(String[]args){inti=1;intj=i++;if((i>++j)&&(i++==j)){i+=j;}}}Whatisthefinalvalueofi?()

    A.1

    B.2

    C.3

    D.4

    E.5


    参考答案:B

  • 第2题:

    以下哪个是有效的Java程序入口函数?

    A.public static void main(String[] args);

    B.public static void main();

    C.public static int main(String[] args);

    D.public static void main(int argc, String[] args)


    public static void main(String[] args);

  • 第3题:

    19、以下哪个是有效的Java程序入口函数?

    A.public static void main(String[] args);

    B.public static void main();

    C.public static int main(String[] args);

    D.public static void main(int argc, String[] args)


    public static void main(String[] args);

  • 第4题:

    publicstaticvoidmain(String[]args){Integera=newInteger(10);Integerb=newInteger(10);Integerc=a;intd=10;doublee=10.0;}Whichthreeevaluatetotrue?()

    A.(a==c)

    B.(d==e)

    C.(b==d)

    D.(a==b)

    E.(b==c)

    F.(d==10.0)


    参考答案:A, B, F

  • 第5题:

    以下哪个main方法是正确的?

    A.public static void main(string[] args)

    B.public static void Main(String[] args)

    C.public static void main(String[] args)

    D.public static main(String[] args)

    E.public void main(String[] args)


    public static void main(String[] args)