niusouti.com

Given:Which code, inserted at line 14, allows the Sprite class to compile?()A.Direction d = NORTH;B.Nav.Direction d = NORTH;C.Direction d = Direction.NORTH;D.Nav.Direction d = Nav.Direction.NORTH;

题目
Given:Which code, inserted at line 14, allows the Sprite class to compile?()

A.Direction d = NORTH;

B.Nav.Direction d = NORTH;

C.Direction d = Direction.NORTH;

D.Nav.Direction d = Nav.Direction.NORTH;


相似考题
更多“Given:Which code, inserted at line 14, allows the Sprite class to compile?() ”相关问题
  • 第1题:

    Given:WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidatefor garbagecollection?()

    A.Line16

    B.Line17

    C.Line18

    D.Line19


    参考答案:D

  • 第2题:

    Given:WhichchangecanyoumaketoTargetwithoutaffectingClient?()

    A.Line4ofclassTargetcanbechangedtoreturni++;

    B.Line2ofclassTargetcanbechangedtoprivateinti=1;

    C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){

    D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;


    参考答案:D

  • 第3题:

    为了将HelloApplet(主类名为HelloApplet.class)嵌入在greeting.html文件中,应该在下列greeting.html文件的横线处填入的代码是( )。

    A.(elloApplet.class

    B.CODE=”(elloApplet.class”

    C.CODE=”(elloApplet.class”WIDTH=150HEIGHT=25

    D.CODE=”(elloApplet.class”VSPACE=10HSPACE=10


    正确答案:C
    在html页中包含Applet时,C()DE=ap-pletfile指定了包含Applet或JApplet字节码的文件名,WIDTH=pixelsHEIGHT=pixels定义了Applet显示区以像素为单位的高度和宽度。

  • 第4题:

    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

  • 第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题:

    为了将HelloApplet(主类名为HelloApplet.class)嵌入在greetmg.html文件中,应该在下列greeting.html文件的横线处填入的代码是( )。 <HTML> <HEAD> <TITLE>Greetings</TITLE> </HEAD> <BODY> <APPLET______"> </APPLET> </BODY> </HTML>

    A.HellOApplet.class

    B.CODE="HellOApplet.class"

    C.CODE="HelloApplet.class"WIDTH=150 HEIGHT=25

    D.CODE="HelloApplet.class"VSPACE=10HSPACE=10


    正确答案:C
    解析:在html页中包含Applet时,CODE=appletfile指定了包含Applet或JApplet字节码的文件名,WIDTH=pixels HEIGHT=pixels定义了Applet显示区以像素为单位的高度和宽度。