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();

题目
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();


相似考题
更多“Given:Which code, inserted at line 16, correctly retrieves a local instance of a Point object?() ”相关问题
  • 第1题:

    Click the Exhibit button.Given:What is the result?()

    A.Line 26 prints "a" to System.out.

    B.Line 26 prints "b" to System.out.

    C.An exception is thrown at line 26 at runtime.

    D.Compilation of class A will fail due to an error in line 6.


    参考答案:A

  • 第2题:

    Given:WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidatefor garbagecollection?()

    A.Line16

    B.Line17

    C.Line18

    D.Line19


    参考答案:D

  • 第3题:

    Given:WhichchangecanyoumaketoTargetwithoutaffectingClient?()

    A.Line4ofclassTargetcanbechangedtoreturni++;

    B.Line2ofclassTargetcanbechangedtoprivateinti=1;

    C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){

    D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;


    参考答案:D

  • 第4题:

    Given:When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?()

    A.Line 5

    B.Line 6

    C.Line 7

    D.Line 8

    E.Line 9

    F.Line 10


    参考答案:D

  • 第5题:

    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