更多“Given:Iftheusertypesthepasswordaikowhenprompted,whatistheresult?() ”相关问题
  • 第1题:

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

    A.Anexceptionisthrownatruntime.

    B.Piisapproximately3.

    C.Piisapproximately3.141593.

    D.Compilationfails.


    参考答案:A

  • 第2题:

    Given:AprogrammeriteratesovertheTreeSetandprintsthenameofeachDrinkobject.Whatistheresult?()

    A.Tea

    B.Coffee

    C.CoffeeTea

    D.Compilationfails


    参考答案:B

  • 第3题:

    Given:andtwoseparatecommandlineinvocations:javaYippeejavaYippee1234Whatistheresult?()

    A.Nooutputisproduced.123

    B.Nooutputisproduced.234

    C.Nooutputisproduced.1234

    D.Anexceptionisthrownatruntime.123


    参考答案:B

  • 第4题:

    Given:IfaninstanceofclassBeagleiscreated,thenSerialized,thendeSerialized,whatistheresult?()

    A.ad

    B.ada

    C.add

    D.adad


    参考答案:B

  • 第5题:

    Given:String[]elements={"for","tea","too"};Stringfirst=(elements.length>0)?elements[0]:null;Whatistheresult?()

    A.Compilationfails.

    B.Anexceptionisthrownatruntime.

    C.Thevariablefirstissettonull.

    D.Thevariablefirstissettoelements[0].


    参考答案:D