Given:   12. System.out.format("Pi is approximately %d.", Ma

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

现有importjava.io.PrintWriter;classDoFormat{publicstaticvoidmain(String[]args){intx=42;inty=12345;floatZ-7;System.out.format("一%4d-",X);System.out.format("-%4d-",y);System.out.format("-%4.ld-",z);}}结果为:()

A.编译失败

B.-42--1234--7.0-

C.-42--1234--7.0-

D.-42--12345--7.0-

E.运行时异常被抛出


参考答案:E

第2题:

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

A.Anexceptionisthrownatruntime.

B.Piisapproximately3.

C.Piisapproximately3.141593.

D.Compilationfails.


参考答案:A

第3题:

ClicktheExhibitbutton.Given:11.<%com.example.Advisoradvisor=newcom.example.Advisor();%>12.<%request.setAttribute("foo",advisor);%>Assumingtherearenoother"foo"attributesinthewebapplication,whichthreearevalidELexpressionsforretrievingtheadvicepropertyofadvisor?()

A.${foo.advice}

B.${request.foo.advice}

C.${requestScope.foo.advice}

D.${requestScope[foo[advice]]}

E.${requestScope["foo"]["advice"]}


参考答案:A, C, E

第4题:

Travelling by train to Tokyo takes approximately one hour less _____ travelling by car.

A. for
B. with
C. as
D. than

答案:D
解析:

第5题:

Given11.publicinterfaceStatus{12./*insertcodehere*/intMY_VALUE=10;13.}Whichthreearevalidonline12?()

A.final

B.static

C.native

D.public

E.private


参考答案:A, B, D

第6题:

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

A.Compilationfails.

B.Piisapproximately3.

C.Piisapproximately3.141593.

D.Anexceptionisthrownatruntime.


参考答案:D

第7题:

Given:11.Stringtest="TestA.TestB.TestC.";12.//insertcodehere13.String[]result=test.split(regex);Whichregularexpression,insertedatline12,correctlysplitstestinto"TestA","TestB",and"TestC"?()

A.Stringregex="";

B.Stringregex="";

C.Stringregex=".*";

D.Stringregex="\\s";

E.Stringregex="\\.\\s*";


参考答案:E

第8题:

importjava.io.PrintWriter;classDoFormat{publicstaticvoidmain(String[]args){intx=42;inty=12345;floatz=7;System.out.format("-%4d-",x);System.out.format("-%4d-",y);System.out.format("-%4.1d-",z);}}结果为:()

A.编译失败

B.-42--1234--7.0-

C.-42--1234--7.0-

D.运行时异常被抛出


参考答案:D

第9题:

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

第10题:

A customer needs approximately 15 to 20 wireless APs for RF coverage. Given that the customer is going to use the 1010 light weight AP with the advanced feature set, what other product is required to complete this operational functionality? () 

  • A、 2700
  • B、 WLSE
  • C、 4124
  • D、 2006
  • E、 4112

正确答案:C

更多相关问题