1. import java.util.*; 2. class ForInTest { 3. static List list = new ArrayList(); 4. 5. static List getList() { return list; } 6. 7. public static void main(String [] args) { 8. list.add("a"); list.add("b"); list.add("c"); 9. // insert code here 10. System.out.print(o); 11. } 12. } 第 9 行插入哪一项将输出 abc?()
- Afor(char o: list)
- Bfor(Object o: getList())
- Cfor(Object o: getList();)
- Dfor(Object o: o.getList())