niusouti.com

单选题Given:   12. System.out.format("Pi is approximately %d.", Math.PI);   What is the result?()AAn exception is thrown at runtime.BPi is approximately 3.CPi is approximately 3.141593.DCompilation fails.

题目
单选题
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.


相似考题
更多“单选题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.”相关问题
  • 第1题:

    在JavaScript中,下面哪一条语句在页面上显示圆周率π。()

    A.document.write(Math.Pi)

    B.document.write(Math.pi)

    C.document.write(Math.PI)x


    答案:C

  • 第2题:

    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

    正确答案:D

  • 第3题:

    System.out.format(”Pi is approximately %d.”, Math.PI);  What is the result?() 

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

    正确答案:D

  • 第4题:

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

    collie

    B

    harrier

    C

    Compilation fails.

    D

    collie harrier

    E

    An exception is thrown at runtime.


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

  • 第5题:

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

  • 第6题:

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

  • 第7题:

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

    TestA

    B

    TestB

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第8题:

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

     Compilation fails.

    B

     Pi is approximately 3.

    C

     Pi is approximately 3.141593.

    D

     An exception is thrown at runtime.


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

  • 第9题:

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

     An exception is thrown at runtime.

    B

     int Long

    C

     Compilation fails.

    D

     Short Long


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

  • 第10题:

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

     An exception is thrown at runtime.

    B

     r, e, o,

    C

     Compilation fails.

    D

     r, t, t,


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

  • 第11题:

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

  • 第12题:

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

  • 第13题:

    A(73)is a value that never changes, for example: the value of Pi(approximately 3.14).

    A.variable

    B.string

    C.Boolean

    D.constant


    正确答案:D
    解析:译文:常量是不会改变的量,例如:Pi的值(近似于3.14)。

  • 第14题:

    Float pi = new Float(3.14f);  if(pi>3) {  System.out.print(”pi is bigger than 3. “);  }  else {  System.out.print(”pi is not bigger than 3. “); }  finally {  System.out.println(”Have a nice day.”);  }  What is the result?() 

    • A、 Compilation fails.
    • B、 pi is bigger than 3.
    • C、 An exception occurs at runtime.
    • D、 pi is bigger than 3. Have a nice day.
    • E、 pi is not bigger than 3. Have a nice day.

    正确答案:A

  • 第15题:

    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

  • 第16题:

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

    r, t, t,

    B

    r, e, o,

    C

    Compilation fails.

    D

    An exception is thrown at runtime.


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

  • 第17题:

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

    Compilation fails.

    B

    An exception is thrown at runtime.

    C

    The code executes normally and prints "sleep".

    D

    The code executes normally, but nothing is printed.


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

  • 第18题:

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

  • 第19题:

    单选题
    Float pi = new Float(3.14f);  if(pi>3) {  System.out.print(”pi is bigger than 3. “);  }  else {  System.out.print(”pi is not bigger than 3. “); }  finally {  System.out.println(”Have a nice day.”);  }  What is the result?()
    A

     Compilation fails.

    B

     pi is bigger than 3.

    C

     An exception occurs at runtime.

    D

     pi is bigger than 3. Have a nice day.

    E

     pi is not bigger than 3. Have a nice day.


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

  • 第20题:

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

  • 第21题:

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

  • 第22题:

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

    peep

    B

    bark

    C

    meow

    D

    Compilation fails.

    E

    An exception is thrown at runtime.


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

  • 第23题:

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

  • 第24题:

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