Given:12.NumberFormatnf=NumberFormat.getInstance();13.nf.setMaximumFractionDigits(4);14.nf.setMinimumFractionDigits(2);15.Stringa=nf.format(3.1415926);16.Stringb=nf.format(2);WhichtwostatementsaretrueabouttheresultifthedefaultlocaleisLocale.US?()A.Thevalu

题目

Given:12.NumberFormatnf=NumberFormat.getInstance();13.nf.setMaximumFractionDigits(4);14.nf.setMinimumFractionDigits(2);15.Stringa=nf.format(3.1415926);16.Stringb=nf.format(2);WhichtwostatementsaretrueabouttheresultifthedefaultlocaleisLocale.US?()

A.Thevalueofbis2.00.

B.Thevalueofais3.141.

C.Thevalueofais3.14.

D.Thevalueofbis2.0000.

E.Thevalueofais3.1415.

F.Thevalueofais3.1416.

G.Thevalueofbis2.


相似考题
更多“Given:12.NumberFormatnf=NumberFormat.getInstance();13.nf.setMaximumFractionDigits(4);14.nf ”相关问题
  • 第1题:

    Given:WhichchangecanyoumaketoTargetwithoutaffectingClient?()

    A.Line4ofclassTargetcanbechangedtoreturni++;

    B.Line2ofclassTargetcanbechangedtoprivateinti=1;

    C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){

    D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;


    参考答案:D

  • 第2题:

    Given:Whenline14isreached,howmanyobjectsareeligibleforthegarbagecollector?()

    A.0

    B.1

    C.2

    D.3

    E.4


    参考答案:E

  • 第3题:

    Given: int m=7; float x=2.5, y=4.7; what is the value of the expression of x+m%3* (int) (x+y)%2/4 ().

    A.2.500000

    B.2.750000

    C.3.500000

    D.0.000000


    difference

  • 第4题:

    Given:11.doubleinput=314159.26;12.NumberFormatnf=NumberFormat.getInstance(Locale.ITALIAN);13.Stringb;14.//insertcodehereWhichcode,insertedatline14,setsthevalueofbto314.159,26?()

    A.b=nf.parse(input);

    B.b=nf.format(input);

    C.b=nf.equals(input);

    D.b=nf.parseObject(input);


    参考答案:B

  • 第5题:

    Given:1.packagetest;2.3.classTarget{4.publicStringname="hello";5.}Whatcandirectlyaccessandchangethevalueofthevariablename?()

    A.anyclass

    B.onlytheTargetclass

    C.anyclassinthetestpackage

    D.anyclassthatextendsTarget


    参考答案:C