niusouti.com
更多“单选题Given: What is the result?()A 1B 2C 12D Compilation fails.E No output is produced.F An exception is thrown at runtime.”相关问题
  • 第1题:

    public class Alpha{  public static void main( string[] args ){  if ( args.length == 2 ) {  if ( args.[0].equalsIgnoreCase(“-b”) )  System.out.println( new Boolean( args[1] ));  }  }  }   And the code is invoked by using the command: java Alpha –b TRUE   What is the result?()  

    • A、 true
    • B、 null
    • C、 false
    • D、 Compilation fails.
    • E、 The code runs with no output.
    • F、 An exception is thrown at runtime.

    正确答案:A

  • 第2题:

    System.out.println(Math.sqrt(-4D));  What is the result?()  

    • A、 –2
    • B、 NaN
    • C、 Infinity
    • D、 Compilation fails.
    • E、 An exception is thrown at runtime.

    正确答案:B

  • 第3题:

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

    collie

    B

    harrier

    C

    Compilation fails.

    D

    collie harrier

    E

    An exception is thrown at runtime.


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

  • 第4题:

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

  • 第5题:

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

  • 第6题:

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

  • 第7题:

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

    peep

    B

    bark

    C

    meow

    D

    Compilation fails.

    E

    An exception is thrown at runtime.


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

  • 第8题:

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

    No output is produced. 1 2 3

    B

    No output is produced. 2 3 4

    C

    No output is produced. 1 2 3 4

    D

    An exception is thrown at runtime. 1 2 3


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

  • 第9题:

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

  • 第10题:

    单选题
    public class Alpha{  public static void main( string[] args ){  if ( args.length == 2 ) {  if ( args.[0].equalsIgnoreCase(“-b”) )  System.out.println( new Boolean( args[1] ));  }  }  }   And the code is invoked by using the command: java Alpha –b TRUE   What is the result?()
    A

     true

    B

     null

    C

     false

    D

     Compilation fails.

    E

     The code runs with no output.

    F

     An exception is thrown at runtime.


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

  • 第11题:

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

  • 第12题:

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

  • 第13题:

    public class Foo {  public static void main(String[] args) {  try {  return;  } finally {  System.out.println( “Finally” );  }  }  }  What is the result?()

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

    正确答案:A

  • 第14题:

    String a = null;  a.concat(“abc”);  a.concat(“def”);  System.out.println(a);   What is the result?()  

    • A、 abc
    • B、 null
    • C、 abcdef
    • D、 Compilation fails.
    • E、 The code runs with no output.
    • F、 An exception is thrown at runtime.

    正确答案:F

  • 第15题:

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

    r, t, t,

    B

    r, e, o,

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第16题:

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

    42

    B

    420

    C

    462

    D

    42042

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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

  • 第17题:

    单选题
    String a = null;  a.concat(“abc”);  a.concat(“def”);  System.out.println(a);   What is the result?()
    A

     abc

    B

     null

    C

     abcdef

    D

     Compilation fails.

    E

     The code runs with no output.

    F

     An exception is thrown at runtime.


    正确答案: D
    解析: Exception in thread "main" java.lang.NullPointerException at X.main(X.java:12) 

  • 第18题:

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

    TestA

    B

    TestB

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第19题:

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

    null

    B

    finally

    C

    null finally

    D

    Compilation fails.

    E

    finally exception


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

  • 第20题:

    单选题
    System.out.println(Math.sqrt(-4D));  What is the result?()
    A

     –2

    B

     NaN

    C

     Infinity

    D

     Compilation fails.

    E

     An exception is thrown at runtime.


    正确答案: 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题:

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

    7

    B

    49

    C

    343

    D

    Compilation fails.

    E

    An exception is thrown at runtime.


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

  • 第23题:

    单选题
    What is the result?()
    A

    1

    B

    12

    C

    14

    D

    123

    E

    Compilation fails.

    F

    An exception is thrown at runtime.


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