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