完整的代码是这样的
- <P>public class Test
- {
- public static void main(String[] args)
- {
- List list = new ArrayList();//错误信息:Type mismatch: cannot convert from ArrayList to List
- copy(list);
- }
- public static void copy(List list)
- {
- Iterator iterator = list.iterator();//错误信息:The method iterator() is undefined for the type List
- }</P>
- <P>}</P>
复制代码 请大家分析一下
|