本帖最后由 常佳杰 于 2012-6-18 10:05 编辑
import java.awt.List;
import java.util.ArrayList;
public class Bank {
public static void main(String[] args) {
List<Integer> list1 = new ArrayList<Integer>();
list1.add(21);
List<String> list2 = new ArrayList<String>();
list2.add("asdf");
System.out.println(list1.getClass() == list2.getClass());
}
}
错误提示是:Multiple markers at this line
- The type List is not generic; it cannot be parameterized with arguments
<Integer>
- List cannot be resolved to a type
- ArrayList cannot be resolved to a type
怎么回事?
|
|