Given:Which code, inserted at line 4, guarantees that this program will output [1, 2]()?A.Set set = new TreeSet();B.Set set = new HashSet();C.Set set = new SortedSet();D.List set = new SortedList();E.Set set = new LinkedHashSet();

题目
Given:Which code, inserted at line 4, guarantees that this program will output [1, 2]()?

A.Set set = new TreeSet();

B.Set set = new HashSet();

C.Set set = new SortedSet();

D.List set = new SortedList();

E.Set set = new LinkedHashSet();


相似考题
更多“Given:Which code, inserted at line 4, guarantees that this program will output [1, 2]()? ”相关问题
  • 第1题:

    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

  • 第2题:

    Given:WhichchangecanyoumaketoTargetwithoutaffectingClient?()

    A.Line4ofclassTargetcanbechangedtoreturni++;

    B.Line2ofclassTargetcanbechangedtoprivateinti=1;

    C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){

    D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;


    参考答案:D

  • 第3题:

    请看以下存储过程

    begin

    begin

    <语句1>

    exception

    when others

    dbms_output.put_line('错误1');

    end;

    begin

    <语句2>

    dbms_output.putline('错误2');

    end;

    exception

    when others then

    dbms_output.put_line("错误3");

    end;

    请问,当<语句1>,<语句2>出错时,该存储过程输出字符串分别是什么?


    正确答案:
     

  • 第4题:

    Given:WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidatefor garbagecollection?()

    A.Line16

    B.Line17

    C.Line18

    D.Line19


    参考答案:D

  • 第5题:

    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

  • 第6题:

    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