多选题switch (i) {   default:  310-025   Leading the way in IT testing and certification tools,www.testking.com   - 27 -  System.out.printIn(“Hello”);  }   What are the two acceptable types for the variable i? ()ACharBByteCFloatDDoubleEObject

题目
多选题
switch (i) {   default:  310-025   Leading the way in IT testing and certification tools,www.testking.com   - 27 -  System.out.printIn(“Hello”);  }   What are the two acceptable types for the variable i? ()
A

Char

B

Byte

C

Float

D

Double

E

Object


相似考题
参考答案和解析
正确答案: E,C
解析: 暂无解析
更多“多选题switch (i) {   default:  310-025   Leading the way in IT testing and certification tools,www.testking.com   - 27 -  System.out.printIn(“Hello”);  }   What are the two acceptable types for the variable i? ()ACharBByteCFloatDDoubleEObject”相关问题
  • 第1题:

    以下程序的输出结果是()。includevoid main(){int a(5),b(6),i(0),j(0);switch(a) {

    以下程序的输出结果是( )。 #include<iostream.h> void main() { int a(5),b(6),i(0),j(0); switch(a) { case 5:switch(b) { case 5:i++;break; case 6:j++;break; default:i++;j++; } case 6:i++; j++; break; default:i++;j++; } cout<<i<<","<<j<<endl; }

    A.1,2

    B.1,3

    C.2,2

    D.2,3


    正确答案:A

  • 第2题:

    switch(i){default:System.out.printIn(Hello”);}Whatistheacceptabletypeforthevariablei?()

    A.Byte

    B.Long

    C.Float

    D.Double

    E.Object

    F.AandB

    G.CandD


    参考答案:A

  • 第3题:

    classsuper(publicintI=0;publicsuper(stringtext)(I=1))publicclasssubextendssuper(publicsub(stringtext)(i=2)publicstaticvoidmain(straingargs[])(subsub=newsub(Hello”);system.out.PrintIn(sub.i);))Whatistheresult?()

    A.Compilationwillfail.

    B.Compilationwillsucceedandtheprogramwillprint“0”

    C.Compilationwillsucceedandtheprogramwillprint“1”

    D.Compilationwillsucceedandtheprogramwillprint“2”


    参考答案:A

  • 第4题:

    编译和执行以下代码,输出结果是( )。 int i=1; switch (i) { case 0: System.out.print("zero,"); break; case 1: System.out.print("one,"); case 2: System.out.print("two,"); default: System.out.println("default"); }

    A.one,

    B.one,two,

    C.one,two,default

    D.default


    正确答案:C

  • 第5题:

    以下程序的输出结果是( )。main(){ int i; for(i=0;i<3;i++) switch(i) { case 0:printf(&quo

    以下程序的输出结果是( )。

    main()

    { int i;

    for(i=0;i<3;i++)

    switch(i)

    { case 0:printf("%d",i);

    case 2:printf("%d",i);

    default:printf("%d",i); }

    }

    A.000102

    B.000020

    C.000122

    D.000111


    正确答案:C
    当i=0时,执行switch语句,对应的执行case0,输出0,因为没有break,接着执行case2的语句,又输出一个0,接着执行default语句,再输出一个0,返回i++;i=1时,没有case语句,执行default语句,输出一个1,接着又返回i++;当i=2时执行case2和default语句分别输出一个2,此时又返回i++,i变为3,for循环不成立,终止,最后输出000122。

  • 第6题:

    I shall be surprised if he does this the same way()I do.

    • A、as
    • B、which 
    • C、like 
    • D、what

    正确答案:A

  • 第7题:

    switch(x) {  default:  System.out.println(“Hello”);  }  Which two are acceptable types for x?() 

    • A、 byte
    • B、 long
    • C、 char
    • D、 float
    • E、 Short
    • F、 Long

    正确答案:A,C

  • 第8题:

    Given:  310-025   Leading the way in IT testing and certification tools, www.testking.com   - 48 -   public class foo {   static String s;   public static void main (Stringargs) {   system.out.printIn (“s=” + s);   }   }   What is the result?()

    • A、 The code compiles and “s=” is printed.
    • B、 The code compiles and “s=null” is printed.
    • C、 The code does not compile because string s is not initialized.
    • D、 The code does not compile because string s cannot be referenced.
    • E、 The code compiles, but a NullPointerException is thrown when toString is called.

    正确答案:B

  • 第9题:

    switch (i)  {  default:  System.out.printIn(“Hello”);  )   What are the two acceptable types for the variable i?()  

    • A、 Char
    • B、 Byte
    • C、 Float
    • D、 Double
    • E、 Object

    正确答案:A,B

  • 第10题:

    单选题
    Given:  310-025   Leading the way in IT testing and certification tools, www.testking.com   - 48 -   public class foo {   static String s;   public static void main (Stringargs) {   system.out.printIn (“s=” + s);   }   }   What is the result?()
    A

     The code compiles and “s=” is printed.

    B

     The code compiles and “s=null” is printed.

    C

     The code does not compile because string s is not initialized.

    D

     The code does not compile because string s cannot be referenced.

    E

     The code compiles, but a NullPointerException is thrown when toString is called.


    正确答案: B
    解析: 暂无解析

  • 第11题:

    多选题
    switch (i) {   default:  310-025   Leading the way in IT testing and certification tools,www.testking.com   - 27 -  System.out.printIn(“Hello”);  }   What are the two acceptable types for the variable i? ()
    A

    Char

    B

    Byte

    C

    Float

    D

    Double

    E

    Object


    正确答案: E,D
    解析: 暂无解析

  • 第12题:

    多选题
    switch(x) {  default:  System.out.println(“Hello”);  }  Which two are acceptable types for x?()
    A

    byte

    B

    long

    C

    char

    D

    float

    E

    Short

    F

    Long


    正确答案: E,D
    解析: 暂无解析

  • 第13题:

    下列程序的运行结果为【】。 include void main(void) {int i=10;switch(i){case 9:i=i

    下列程序的运行结果为【 】。

    include<iostream.h>

    void main(void)

    {int i=10;

    switch(i)

    { case 9:i=i+1;

    case 10:i=i+1;

    case 11:i=i+1;

    default:i=i+1;

    }

    cout<<i<<endl;

    }


    正确答案:13
    13

  • 第14题:

    switch(i){default:System.out.printIn(Hello”);)Whatarethetwoacceptabletypesforthevariablei?()

    A.Char

    B.Byte

    C.Float

    D.Double

    E.Object


    参考答案:A, B

  • 第15题:

    switch(i){default:310-025LeadingthewayinITtestingandcertificationtools,www.testking.com-27-System.out.printIn(Hello”);}Whatarethetwoacceptabletypesforthevariablei?()

    A.Char

    B.Byte

    C.Float

    D.Double

    E.Object


    参考答案:A, B

  • 第16题:

    以下程序的输出结果是( )。 main { int i; for(i=0;i<3;i++) switch(i){case 0:printf("%d",i); case 2:printf("%d",i); default:printf("%d",i); } }

    A.000102

    B.000020

    C.000122

    D.000111


    正确答案:C
    当i=0时,执行switch语句,对应的执行case0,输出0,因为没有break,接着执行case2的语句,又输出一个0,接着执行default语句,再输出一个0,返回i++;i=1时,没有case语句,执行default语句,输出一个1,接着又返回i++;当i=2时执行case2和default语句分别输出一个2,此时又返回i++,i变为3,for循环不成立,终止,最后输出000122。

  • 第17题:

    #include

    main()

    { char str[ ]=“The C program”,c;

    int i;

    for(i=2;(c=str[i])!=‘\0’;i++)

    { switch(c)

    { case ‘g’: ++i; break;

    case ‘o’: continue;

    default: printf(“%c”,c); continue;

    }

    printf(“*”);

    }

    printf(“\n”);

    }


    正确答案:
    4.e C pr*am

  • 第18题:

    A:Hello,()B:WherecanIbuysomestampsC://Atthestampcounteroverthere.

    • A、Can I help you
    • B、May I help you
    • C、What can I do for you
    • D、Anything I can do for you

    正确答案:A,B,C,D

  • 第19题:

    int I=1, j=0   switch(i) {   case 2:   j+=6;   case 4:   j+=1;    default:    j +=2;   case 0:   j +=4;   }   What is the value of j at line 16?()

    • A、 0
    • B、 1
    • C、 2
    • D、 4
    • E、 6

    正确答案:A,E

  • 第20题:

    switch (i) {   default:  310-025   Leading the way in IT testing and certification tools,www.testking.com   - 27 -  System.out.printIn(“Hello”);  }   What are the two acceptable types for the variable i? ()

    • A、 Char
    • B、 Byte
    • C、 Float
    • D、 Double
    • E、 Object

    正确答案:A,B

  • 第21题:

    switch (i) {  default:   System.out.printIn(“Hello”);   }  What is the acceptable type for the variable i?()  

    • A、 Byte
    • B、 Long
    • C、 Float
    • D、 Double
    • E、 Object
    • F、 A and B
    • G、 C and D

    正确答案:A

  • 第22题:

    单选题
    switch (i)  {  default:  System.out.printIn(“Hello”);  }  What is the acceptable type for the variable i?()
    A

     Byte

    B

     Long

    C

     Float

    D

     Double

    E

     Object

    F

     A and B

    G

     C and D


    正确答案: F
    解析: 暂无解析

  • 第23题:

    多选题
    switch (i)  {  default:  System.out.printIn(“Hello”);  )   What are the two acceptable types for the variable i?()
    A

    Char

    B

    Byte

    C

    Float

    D

    Double

    E

    Object


    正确答案: C,B
    解析: 暂无解析

  • 第24题:

    多选题
    int I=1, j=0   switch(i) {   case 2:   j+=6;   case 4:   j+=1;    default:    j +=2;   case 0:   j +=4;   }   What is the value of j at line 16?()
    A

    0

    B

    1

    C

    2

    D

    4

    E

    6


    正确答案: C,A
    解析: 暂无解析