网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
定义枚举如下:publicenumDirection{EAST,SOUTH,WEST,NORTH}下列正确使用该枚举类型的语句是哪项?()

A.DirectionDirection=EAST;

B.Directiondirection=Direction.WEST;

C.inta-Direction.NORTH;

D.Directiondirection=2;


参考答案

更多 “ 定义枚举如下:publicenumDirection{EAST,SOUTH,WEST,NORTH}下列正确使用该枚举类型的语句是哪项?() A.DirectionDirection=EAST;B.Directiondirection=Direction.WEST;C.inta-Direction.NORTH;D.Directiondirection=2; ” 相关考题
考题 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;

考题 请将下列程序的空白处补充完整。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());

考题 定义如下枚举类型:enum Number{one=l,tow=2,four=4,eight=8},则下列语句正确的是( )。A.Number num=1;B.Number num=Number(20);C.Number num=Number(eight|0xFF);D.枚举类型Number的取值范围是0~15

考题 定义如下枚举类型:enum Number{one=1,two=2,four=4,eight=8),则下列语句正确的是( )。A.Number num=1;B.Numbernum=Number(20);C.Number num=Number(eight│OxFF);D.枚举类型Number的取值范围是0~15

考题 定义如下枚举类型:enum Number{one=1,tow=2,four=4,eight=8},则下列语句正确的是( )。A.Number num=1;B.Number num=Number(20);C.Number num=Number(eight|OxFF);D.枚举类型Number的取值范围是0~15

考题 下面对枚举类型的描述正确的是( )。A.枚举类型的定义为:enum {Monday, Tuesday, Wednesday, Thursday, Friday} Day;B.在C++语言中,用户自定义的枚举类型的第一个常量的默认值是1C.可以定义如下枚举类型:enum {Monday, Tuesday, Wednesday=5, Thursday, Friday=5};D.以上说法都不正确

考题 Java语言中关于枚举类,说法正确的是________。A.枚举类型也可以实现一个或多个接口B.枚举类型实现接口时也要实现该接口中全部方法C.枚举类型里定义抽象方法无须显示使用abstract关键字D.枚举类型继承接口要使用关键字是extends

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