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

参考答案和解析
正确答案: D
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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.


参考答案:A

第2题:

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

A.document.write(Math.Pi)

B.document.write(Math.pi)

C.document.write(Math.PI)x


答案:C

第3题:

System.out.format(”Piisapproximately%d.”,Math.PI);Whatistheresult?()

A.Compilationfails.

B.Piisapproximately3.

C.Piisapproximately3.141593.

D.Anexceptionisthrownatruntime.


参考答案:D

第4题:

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

第5题:

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

第6题:

Given:12.System.out.format("Piisapproximately%d.",Math.PI);Whatistheresult?()

A.Anexceptionisthrownatruntime.

B.Piisapproximately3.

C.Piisapproximately3.141593.

D.Compilationfails.


参考答案:A

第7题:

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)。

第8题:

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.


参考答案:C

第9题:

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

第10题:

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

更多相关问题