参考答案和解析
正确答案: A
解析: 暂无解析
更多“单选题Given: What is the result?()A collieB harrierC Compilation fails.D collie harrierE An exception is thrown at runtime.”相关问题
  • 第1题:

    public class Test {  public enum Dogs {collie, harrier};  public static void main(String [] args) {  Dogs myDog = Dogs.collie;  switch (myDog) {  case collie:  System.out.print(”collie “); case harrier:  System.out.print(”harrier “);  }  }  }  What is the result?() 

    • A、 collie
    • B、 harrier
    • C、 Compilation fails.
    • D、 collie harrier
    • E、 An exception is thrown at runtime.

    正确答案:D

  • 第2题:

    单选题
    public class Test {  private static float[] f = new float[2];  public static void main(String args[]) {  System.out.println(“f[0] = “ + f[0]);  }  }   What is the result?()
    A

     f[0] = 0

    B

     f[0] = 0.0

    C

     Compilation fails.

    D

     An exception is thrown at runtime.


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

  • 第3题:

    单选题
    Given: What is the result?()
    A

    2

    B

    3

    C

    12

    D

    23

    E

    123

    F

    Compilation fails.

    G

    An exception is thrown at runtime.


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

  • 第4题:

    单选题
    Click the Exhibit button. Given: ClassA a = new ClassA( ); a.methodA( ); What is the result? ()
    A

    Compilation fails.

    B

    ClassC is displayed.

    C

    The code runs with no output.

    D

    An exception is thrown at runtime.


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

  • 第5题:

    单选题
    class Base {  Base() { System.out.print(“Base”); }  }  public class Alpha extends Base {  public static void main( String[] args ) {  new Alpha();  new Base();  }  }  What is the result?()
    A

     Base

    B

     BaseBase

    C

     Compilation fails.

    D

     The code runs with no output.

    E

     An exception is thrown at runtime.


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

  • 第6题:

    单选题
    Given: What is the result?()
    A

     An exception is thrown at runtime.

    B

     int Long

    C

     Compilation fails.

    D

     Short Long


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

  • 第7题:

    单选题
    Given: What is the result?()
    A

    peep

    B

    bark

    C

    meow

    D

    Compilation fails.

    E

    An exception is thrown at runtime.


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

  • 第8题:

    单选题
    public class Test {  public enum Dogs {collie, harrier, shepherd};  public static void main(String [] args) {  Dogs myDog = Dogs.shepherd;  switch (myDog) {  case collie:  System.out.print(”collie “);  case default:  System.out.print(”retriever “); case harrier:  System.out.print(”harrier “);  }  }  }  What is the result?()
    A

     harrier

    B

     shepherd

    C

     retriever

    D

     Compilation fails.

    E

     retriever harrier

    F

     An exception is thrown at runtime.


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

  • 第9题:

    单选题
    Given: What is the result?()
    A

    Afoo Afoo

    B

    Afoo Bfoo

    C

    Bfoo Afoo

    D

    Bfoo Bfoo

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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

  • 第10题:

    单选题
    Given: What is the result when the go( ) method is invoked?()
    A

    00

    B

    0001

    C

    000120

    D

    00012021

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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

  • 第11题:

    单选题
    public class Test {  public enum Dogs {collie, harrier};  public static void main(String [] args) {  Dogs myDog = Dogs.collie;  switch (myDog) {  case collie:  System.out.print(”collie “); case harrier:  System.out.print(”harrier “);  }  }  }  What is the result?()
    A

     collie

    B

     harrier

    C

     Compilation fails.

    D

     collie harrier

    E

     An exception is thrown at runtime.


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

  • 第12题:

    单选题
    Given: What is the result?()
    A

    1

    B

    2

    C

    12

    D

    Compilation fails.

    E

    No output is produced.

    F

    An exception is thrown at runtime.


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

  • 第13题:

    class Base {  Base() { System.out.print(“Base”); }  }  public class Alpha extends Base {  public static void main( String[] args ) {  new Alpha();  new Base();  }  }  What is the result?()  

    • A、 Base
    • B、 BaseBase
    • C、 Compilation fails.
    • D、 The code runs with no output.
    • E、 An exception is thrown at runtime.

    正确答案:B

  • 第14题:

    单选题
    Given: What is the result?()
    A

    r, t, t,

    B

    r, e, o,

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第15题:

    单选题
    Given: What is the output?()
    A

    42

    B

    420

    C

    462

    D

    42042

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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

  • 第16题:

    单选题
    Given: What is the result?()
    A

    TestA

    B

    TestB

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第17题:

    单选题
    Given: What is the result? ()
    A

     A new Item object is created with the preferred value in the id attribute.

    B

     The attribute id in the Item object is modified to the new value.

    C

     Compilation fails.

    D

     An exception is thrown at runtime.

    E

     The attribute id in the Item object remains unchanged.


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

  • 第18题:

    单选题
    Given: What is the result?()
    A

     An exception is thrown at runtime.

    B

     r, e, o,

    C

     Compilation fails.

    D

     r, t, t,


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

  • 第19题:

    单选题
    Given: What is the result?()
    A

    w-f

    B

    f-p w-f

    C

    w-f b-f

    D

    f-p w-f b-f

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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

  • 第20题:

    单选题
    Given: What is the result?()
    A

    An Exception is thrown with no other output

    B

    followed by an Exception

    C

    Compilation fails due to an error on line 9

    D

    Compilation fails due to an error on line 14


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

  • 第21题:

    单选题
    Given: What is the result?()
    A

    test end

    B

    Compilation fails.

    C

    test runtime end

    D

    test exception end

    E

    A Throwable is thrown by main at runtime.


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

  • 第22题:

    单选题
    What is the result?()
    A

    1

    B

    12

    C

    14

    D

    123

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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

  • 第23题:

    单选题
    Given: What is the result?()
    A

    Hello

    B

    Hello World

    C

    Compilation fails.

    D

    Hello World 5

    E

    The code runs with no output.

    F

    An exception is thrown at runtime.


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