classFoo{11.staticvoidalpha(){/*morecodehere*/}12.voidbeta(){/*morecodehere*/}13.}Whichtwoaretrue?()A.Foo.beta()isavalidinvocationofbeta().B.Foo.alpha()isavalidinvocationofalpha().C.Methodbeta()candirectlycallmethodalpha().D.Methodalpha()candirectlycallme

题目
classFoo{11.staticvoidalpha(){/*morecodehere*/}12.voidbeta(){/*morecodehere*/}13.}Whichtwoaretrue?()

A.Foo.beta()isavalidinvocationofbeta().

B.Foo.alpha()isavalidinvocationofalpha().

C.Methodbeta()candirectlycallmethodalpha().

D.Methodalpha()candirectlycallmethodbeta().


相似考题
更多“classFoo{11.staticvoidalpha(){/*morecodehere*/}12.voidbeta(){/*morecodehere*/}13.}Whichtwoaretrue?() ”相关问题
  • 第1题:

    1.publicinterfaceA{

    2.publicvoiddoSomething(Stringthing);

    3.}

    1.publicclassAImplimplementsA{

    2.publicvoiddoSomething(Stringmsg){}

    3.}

    1.publicclassB{

    2.publicAdoit(){

    3.//morecodehere

    4.}

    5.

    6.publicStringexecute(){

    7.//morecodehere

    8.}

    9.}

    1.publicclassCextendsB{

    2.publicAImpldoit(){

    3.//morecodehere

    4.}

    5.

    6.publicObjectexecute(){

    7.//morecodehere

    8.}

    9.}

    Whichstatementistrueabouttheclassesandinterfacesintheexhibit?()


    参考答案:C

  • 第2题:

    Given:Which three methods, inserted individually at line 14, will correctly complete class Two?()

    A.int foo() { /* more code here */ }

    B.void foo() { /* more code here */ }

    C.public void foo() { /* more code here */ }

    D.private void foo() { /* more code here */ }

    E.protected void foo() { /* more code here */ }


    参考答案:B, C, E

  • 第3题:

    Given:10.classOne{11.voidfoo(){}12.}13.classTwoextendsOne{14.//insertmethodhere15.}Whichthreemethods,insertedindividuallyatline14,willcorrectlycompleteclassTwo?()

    A.publicvoidfoo(){/*morecodehere*/}

    B.privatevoidfoo(){/*morecodehere*/}

    C.protectedvoidfoo(){/*morecodehere*/}

    D.intfoo(){/*morecodehere*/}

    E.voidfoo(){/*morecodehere*/}


    参考答案:A, C, E

  • 第4题:

    classOne{voidfoo(){}}classTwoextendsOne{//insertmethodhere}Whichthreemethods,insertedindividuallyatline14,willcorrectlycompleteclassTwo?()

    A.intfoo(){/*morecodehere*/}

    B.voidfoo(){/*morecodehere*/}

    C.publicvoidfoo(){/*morecodehere*/}

    D.privatevoidfoo(){/*morecodehere*/}

    E.protectedvoidfoo(){/*morecodehere*/}


    参考答案:B, C, E

  • 第5题:

    Given:Which method will complete this class?()

    A.public int compareTo(Object o){/*more code here*/}

    B.public int compareTo(Score other){/*more code here*/}

    C.public int compare(Score s1,Score s2){/*more code here*/}

    D.public int compare(Object o1,Object o2){/*more code here*/}


    参考答案:B