试题详情
- 多项选择题 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;
- C,E
关注下方微信公众号,在线模考后查看
热门试题
- 利用线程方法编写JApplet程序,实现
- 下面的输出结果是什么()。
- Which exception
- 程序员想要创建一个名为MyThread
- 对于没有返回值的函数,能否带有retur
- What is th
- 假设有2个整数x和y,表达式x>=y
- 11.public static vo
- Which two
- Which two̳
- Java多线程有几种实现方法()。
- 已知: 那么第5行可以填写?()
- Which method&en
- What is th
- Java数据库连接库JDBC用到哪种设计
- Assume the&ens
- 5. String&ensp
- Click the
- 程序员想要创建一个名为MyThread
- 求“配尔不定方程”的最小正整数解:x