classNav{11.publicenumDirection{NORTH,SOUTH,EAST,WEST}12.}13.publicclassSprite{14.//insertcodehere15.}Whichcode,insertedatline14,allowstheSpriteclasstocompile?() A.Directiond=NORTH;B.Nav.Directiond=NORTH;C.Directiond=Direction.NORTH;D.Nav.Directiond=Nav.Direction.NORTH;

classNav{11.publicenumDirection{NORTH,SOUTH,EAST,WEST}12.}13.publicclassSprite{14.//insertcodehere15.}Whichcode,insertedatline14,allowstheSpriteclasstocompile?()

A.Directiond=NORTH;

B.Nav.Directiond=NORTH;

C.Directiond=Direction.NORTH;

D.Nav.Directiond=Nav.Direction.NORTH;


相关考题:

在Java语言中,把组件放在BorderLayout的()区域时,它会自动垂直调整大小,但不是水平调整。 A.North或SouthB.East或WestC.CenterD.North,South或CenterE.任何区域

In Trial 9, the electrical force exerted by Sphere Y on Sphere X and the electrical force exerted by Sphere X on Sphere Y were exerted in which direction(s)?A.east; eastB.east; westC.west; westD.west; east

定义枚举如下:publicenumDirection{EAST,SOUTH,WEST,NORTH}下列正确使用该枚举类型的语句是哪项?() A.DirectionDirection=EAST;B.Directiondirection=Direction.WEST;C.inta-Direction.NORTH;D.Directiondirection=2;

classParent{Stringone,two; classParent{Stringone,two;publicParent(Stringa,Stringb){one=a;two=b;}publicvoidprint(){System.out.println(one);}}publicclassChildextendsParent{publicChild(Stringa,Stringb){super(a,b);}publicvoidprint(){System.out.println(one+to+two);}publicstaticvoidmain(Stringarg[]){Parentp=newParent(south,north);Parentt=newChild(east,west);p.print();t.print();}}Whichofthefollowingiscorrect?()

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;

请将下列程序的空白处补充完整。Importjava.awt.*;PublicclassEll_4{Publicstaticvoidmain(Stringargs[]){Framef=newFrame(“BorderLayout”);fiadd(“North”,newbuRon(“North”));f.add(“East”,newbutton(“East”));f.add(“West”,newbutton(“West”));f.add(“South”,tf);f.setSize(200,200)fipack();fisetVisible(true);}}

下列程序在Frame中设定BorderLayout布局管理器,选择正确的语句填入程序的横线处。 import java.awt.*; public class ex43 extends Frame { public static void main(String[] args) { ex43 bj = new ex43("BorderLayout"); ______ obj.add("North", new Button("North")); obj.add("South", new Button("Sourth")); obj.add("East", new Button ("East")); obj.add("West", new Button ("West")); obj. add ("Center", new Button ( "Center" ) ); obj.pack(); obj. setVisible (true); } public ex43(String str) { super (str); } }A.obj.setLayout(new BorderLayout());B.setLayout(new Borderkayout());C.setLayout(BorderLayout());D.obj.setLayout(BorderLayout());

当Frame改变大小时,放在其中的按钮大小不变,则使用的layout为()。A.FlowLayoutB.CardLayoutC.BorderLayout 的North和SouthD.BorderLayout 的East 和West

表达“东西南北”四个方位时,英语的习惯一般是______?A.north, east, south and westB.east, west, north and southC.north, south, east and westD.east, south, west and north