欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > 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;

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题