参考答案和解析
正确答案: A
解析: 暂无解析
更多“单选题Given: What is the result?()A  An exception is thrown at runtime.B  r, e, o,C  Compilation fails.D  r, t, t,”相关问题
  • 第1题:

    public static void test(String str) { int check = 4;  if (check = str.length()) {  System.out.print(str.charAt(check -= 1) +“, “);  } else {  System.out.print(str.charAt(0) + “, “);  }  }  and the invocation:  test(”four”);  test(”tee”); test(”to”);  What is the result?() 

    • A、 r, t, t,
    • B、 r, e, o,
    • C、 Compilation fails.
    • D、 An exception is thrown at runtime.

    正确答案:C

  • 第2题:

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

    collie

    B

    harrier

    C

    Compilation fails.

    D

    collie harrier

    E

    An exception is thrown at runtime.


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

  • 第3题:

    单选题
    Runnable r = new Runnable() {  public void run() {  System.out.print(”Cat”);  }  };  Threadt=new Thread(r) {  public void run() {  System.out.print(”Dog”);  }  };  t.start();  What is the result?()
    A

     Cat

    B

     Dog

    C

     Compilation fails.

    D

     The code runs with no output.

    E

     An exception is thrown at runtime.


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

  • 第4题:

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

    test

    B

    null

    C

    An exception is thrown at runtime.

    D

    Compilation fails because of an error in line 1.

    E

    Compilation fails because of an error in line 4.

    F

    Compilation fails because of an error in line 5.


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

  • 第5题:

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

    TestA

    B

    TestB

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第6题:

    单选题
    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
    解析: 暂无解析

  • 第7题:

    单选题
    Given:   11. String test = "This is a test";   12. String[] tokens = test.split("/s");   13. System.out.println(tokens.length);   What is the result?()
    A

     An exception is thrown at runtime.

    B

     1

    C

     4

    D

     Compilation fails.

    E

     0


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

  • 第8题:

    单选题
    public static void test(String str) { int check = 4;  if (check = str.length()) {  System.out.print(str.charAt(check -= 1) +“, “);  } else {  System.out.print(str.charAt(0) + “, “);  }  }  and the invocation:  test(”four”);  test(”tee”); test(”to”);  What is the result?()
    A

     r, t, t,

    B

     r, e, o,

    C

     Compilation fails.

    D

     An exception is thrown at runtime.


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

  • 第9题:

    单选题
    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
    解析: 暂无解析

  • 第10题:

    单选题
    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
    解析: 暂无解析

  • 第11题:

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

    True

    B

    Not true

    C

    An exception is thrown at runtime.

    D

    Compilation fails because of an error at line 12.

    E

    Compilation fails because of an error at line 19.


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

  • 第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题:

    Given:   12. System.out.format("Pi is approximately %d.", Math.PI);   What is the result?()

    • A、 An exception is thrown at runtime.
    • B、 Pi is approximately 3.
    • C、 Pi is approximately 3.141593.
    • D、 Compilation fails.

    正确答案:A

  • 第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 result?()
    A

    test

    B

    Exception

    C

    Compilation fails.

    D

    NullPointerException


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

  • 第16题:

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

    B

    B

    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.

    E

    An Exception is thrown with no other output.


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

  • 第17题:

    单选题
    Given:   12. System.out.format("Pi is approximately %d.", Math.PI);   What is the result?()
    A

     An exception is thrown at runtime.

    B

     Pi is approximately 3.

    C

     Pi is approximately 3.141593.

    D

     Compilation fails.


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

  • 第18题:

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

     An exception is thrown at runtime.

    B

     int Long

    C

     Compilation fails.

    D

     Short Long


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

  • 第19题:

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

    peep

    B

    bark

    C

    meow

    D

    Compilation fails.

    E

    An exception is thrown at runtime.


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

  • 第20题:

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

    X, followed by an Exception.

    B

    No output, and an Exception is thrown.

    C

    Compilation fails due to an error on line 14.

    D

    Compilation fails due to an error on line 16.

    E

    Compilation fails due to an error on line 17.


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

  • 第21题:

    单选题
    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
    解析: 暂无解析

  • 第22题:

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

    7

    B

    49

    C

    343

    D

    Compilation fails.

    E

    An exception is thrown at runtime.


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

  • 第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
    解析: 暂无解析