packagesun.scjp;publicenumColor{RED,GREEN,BLUE}packagesun.beta;//insertcodeherepublicclassBeta{Colorg=GREEN;publicstaticvoidmain(String[]argv){System.out.println(GREEN);}}TheclassBetaandtheenumColorareindifferentpackages.Whichtwocodefragments,insertedindividuallyatline2oftheBetadeclaration,willallowthiscodetocompile?()
A.importsun.scjp.Color.*;
B.importstaticsun.scjp.Color.*;
C.importsun.scjp.Color;importstaticsun.scjp.Color.*;
D.importsun.scjp.*;importstaticsun.scjp.Color.*;
E.importsun.scjp.Color;importstaticsun.scjp.Color.GREEN;
第1题:
1、如下选项,哪个不是定义类型名tcolor________。
A.enum tcolor{red, green, blue};
B.typedef enum color{red,green,blue} tcolor;
C.enum color {red,green,blue}; typedef enum color tcolor;
D.typedef enum {red,green,blue} tcolor;
第2题:
如下选项,哪个不是定义类型名tcolor________。
A.enum tcolor{red, green, blue};
B.typedef enum color{red,green,blue} tcolor;
C.enum color {red,green,blue}; typedef enum color tcolor;
D.typedef enum {red,green,blue} tcolor;
第3题:
8、定义一个颜色的枚举类型Color,下面正确的是()。
A.public enum Color {red, green, yellow, blue}
B.public enum Color {1:red, 2:green, 3:yellow, 4:blue}
C.public enum Color {1:red; 2:green; 3:yellow; 4:blue}
D.public enum Color {Stringred, String green, String yellow, String blue}
第4题:
定义一个颜色的枚举类型Color,下面正确的是()。
A.public enum Color {red, green, yellow, blue}
B.public enum Color {1:red, 2:green, 3:yellow, 4:blue}
C.public enum Color {1:red; 2:green; 3:yellow; 4:blue}
D.public enum Color {Stringred, String green, String yellow, String blue}
第5题:
在Android中颜色值的排列顺序是
A.Red-Green-Blue-Alpha
B.Alpha-Red-Blue-Green
C.Alpha-Red-Green-Blue
D.Blue-Green-Red-Alpha