多项选择题
- list 是一个合法的集合引用 - getCollection() 返回一个合法集合的引用 哪两个是合法的()
A.for(Object o ; list) B.for(Object o : list.iterator()) C.for(Object o : getCollection()) D.for(Iterator i = list.iterator(); i.hasNext (); )
1. class SuperFoo { 2. SuperFoo doStuff(int x) { 3. r...
1. class SuperFoo { 2. SuperFoo doStuff(int x) { 3. return new SuperFoo(); 4. } 5. } 6. 7. class Foo extends SuperFoo { 8. //insert code here 9. } 下面哪三项分别插入到第8行,可以编译?()
A.int doStuff() { return 42; } B.int doStuff(int x) { return 42; } C.Foo doStuff(int x) { return new Foo(); } D.SuperFoo doStuff(int x) { return new Foo(); }
可能抛出SecurityException异常的操作是哪些?()A.访问本地文件系统B.打开除运行Applet...
多项选择题可能抛出SecurityException 异常的操作是哪些? ()
A.访问本地文件系统 B.打开除运行Applet 的主机外的另一个主机的Socket C.在运行环境中执行另一个程序 D.试图读取不存在的文件
遍历全部数组元素的方法有?()A.使用for 循环B.使用迭代器IteratorC.使用枚举器Enumerat...
多项选择题遍历全部数组元素的方法有?()
A.使用for 循环 B.使用迭代器Iterator C.使用枚举器Enumeration D.使用增强型for 循环