当前位置:SCJP程序员认证考试题库

问题:

[多选]

package sun.scjp; 
public enum Color { RED, GREEN, BLUE } 
package sun.beta; 
// insert code here 
public class Beta { 
Color g = GREEN; 
public static void main( String[] argv) 
{ System.out.println( GREEN); } 
} 
The class Beta and the enum Color are in different packages. 
Which two code fragments, inserted individually at line 2 of the Beta declaration, will allow this code to compile?()

A .  import sun.scjp.Color.*;
B .  import static sun.scjp.Color.*;
C .  import sun.scjp.Color; import static sun.scjp.Color.*;
D .  import sun.scjp.*; import static sun.scjp.Color.*;
E .  import sun.scjp.Color; import static sun.scjp.Color.GREEN;

垄断市场上,无论在短期还是在长期,企业均可获得超额利润。 电容容量的大小表示能储存的电能的多少。 商业银行分支机构要开展相关个人理财业务之前。应持其总行的授权文件,按照有关规定,向() 所在地银监会派出机构报告。 所在地银监会派出机构备案。 所在地中国人民银行分行报告。 所在地中国人民银行分行备案。 交流电信号通过电感的频率越小,则电感量越大。 国际单位制单位倍数单位吉[咖]用符号()表示。 T。 M。 G。 E。

package sun.scjp; 
public enum Color { RED, GREEN, BLUE } 
package sun.beta; 
// insert code here 
public class Beta { 
Color g = GREEN; 
public static void main( String[] argv) 
{ System.out.println( GREEN); } 
} 
The class Beta and the enum Color are in different packages. 
Which two code fragments, inserted individually at line 2 of the Beta declaration, will allow this code to compile?()

参考答案:

  参考解析

本题暂无解析

在线 客服