参考答案和解析
参考答案:F
更多“Stringfoo=blue”;Boolean[]bar=newBoolean[1];if(bar[0]){foo=green”;}Whatistheresult?() ”相关问题
  • 第1题:

    publicclassTest{publicstaticvoidmain(Stringargs){stringfoo=blue”;stringbar=foo;foo=green”;System.out.printIn(bar);}}Whatistheresult?()

    A.Anexceptionisthrown.

    B.Thecodewillnotcompile.

    C.Theprogramprints“null”

    D.Theprogramprints“blue”

    E.Theprogramprints“green”


    参考答案:D

  • 第2题:

    intindex=1;intfoo=newint;intbar=foo[index];intbaz=bar+index;Whatistheresult?()

    A.Bazhasthevalueof0

    B.Bazhasthevalueof1

    C.Bazhasthevalueof2

    D.Anexceptionisthrown.

    E.Thecodewillnotcompile.


    参考答案:B

  • 第3题:

    Click the Exhibit button. Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JVM? ()

    A.Jar A

    B.Jar B

    C.Jar C

    D.Jar D

    E.Jar E


    参考答案:A

  • 第4题:

    Stringfoo=blue”;Booleanbar=newBoolean[1];if(bar[0]){foo=green”;}Whatistheresult?()

    A.Foohasthevalueof“”

    B.Foohasthevalueofnull.

    C.Foohasthevalueof“blue”

    D.Foohasthevalueof“green”

    E.Anexceptionisthrown.

    F.Thecodewillnotcompile.


    参考答案:F

  • 第5题:

    publicclasstest(publicstaticvoidmain(stringargs){stringfoo=args[1];stringfoo=args;stringfoo=args;})Andcommandlineinvocation:JavaTestredgreenblueWhatistheresult?()

    A.Bazhasthevalueof“”

    B.Bazhasthevalueofnull

    C.Bazhasthevalueof“red”

    D.Bazhasthevalueof“blue”

    E.Baxhasthevalueof“green”

    F.Theprogramthrowsanexception.


    参考答案:F