Given:Which code fragment, inserted at line 24, outputs "123abc 123abc"?()A.sb1.append("abc"); s1.append("abc");B.sb1.append("abc"); s1.concat("abc");C.sb1.concat("abc"); s1.append("abc");D.sb1.concat("abc"); s1.concat("abc");E.sb1.append("abc"); s1 = s1.

题目
Given:Which code fragment, inserted at line 24, outputs "123abc 123abc"?()

A.sb1.append("abc"); s1.append("abc");

B.sb1.append("abc"); s1.concat("abc");

C.sb1.concat("abc"); s1.append("abc");

D.sb1.concat("abc"); s1.concat("abc");

E.sb1.append("abc"); s1 = s1.concat("abc");

F.sb1.concat("abc"); s1 = s1.concat("abc");

G.sb1.append("abc"); s1 = s1 + s1.concat("abc");

H.sb1.concat("abc"); s1 = s1 + s1.concat("abc");


相似考题
更多“Given:Which code fragment, inserted at line 24, outputs "123abc 123abc"?() ”相关问题
  • 第1题:

    Given:11.publicvoidgenNumbers(){12.ArrayListnumbers=newArrayList();13.for(inti=0;i<10;i++){14.intvalue=i*((int)Math.random());15.IntegerintObj=newInteger(value);16.numbers.add(intObj);17.}18.System.out.println(numbers);19.}WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidateforgarbagecollection?()

    A.Line19

    B.TheobjectisNOTacandidateforgarbagecollection.

    C.Line17

    D.Line16

    E.Line18


    参考答案:A

  • 第2题:

    Given:Which code, inserted at line 16, correctly retrieves a local instance of a Point object?()

    A.Point p = Line.getPoint();

    B.Line.Point p = Line.getPoint();

    C.Point p = (new Line()).getPoint();

    D.Line.Point p = (new Line()).getPoint();


    参考答案:D

  • 第3题:

    Given:35.Stringname="JaneDoe";36.int$age=24;37.Double_height=123.5;38.double~temp=37.5;Whichtwostatementsaretrue?()

    A.Line35willnotcompile.

    B.Line36willnotcompile.

    C.Line37willnotcompile.

    D.Line38willnotcompile.


    参考答案:A, D

  • 第4题:

    Given:WhichchangecanyoumaketoTargetwithoutaffectingClient?()

    A.Line4ofclassTargetcanbechangedtoreturni++;

    B.Line2ofclassTargetcanbechangedtoprivateinti=1;

    C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){

    D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;


    参考答案:D

  • 第5题:

    Given:WhichstatementistrueifaResourceExceptionisthrownonline86?()

    A.Line92willnotexecute.

    B.Theconnectionwillnotberetrievedinline85.

    C.Theresourceconnectionwillnotbeclosedonline88.

    D.Theenclosingmethodwillthrowanexceptiontoitscaller.


    参考答案:C

  • 第6题:

    The relative pronoun "which" in the last paragraph (Line 6) refers to (  ).

    A.experts
    B.periods
    C.theories
    D.issues

    答案:D
    解析: