我在一个文件 中写了两个类,
类一中: private Map<String, Section> sectionIndexMap=null;
sectionIndexMap = new LinkedHashMap<String, Section>();
把sectionIndexMap赋值,并写一个函数:
public Map<String, Section> getMap()
{
return (LinkedHashMap<String, Section>)sectionIndexMap;
}类二中同样定义一个:
private Map<String, Section> IndexMap=null;
IndexMap = new LinkedHashMap<String, Section>();
假设pro为类一的一个对象 ,当我进行以下操作时
IndexMap=pro.getMap();出现错误:
Type mismatch: cannot convert from Map<String,Section> to  Map<String,SwingUtilities2.Section>请问为什么?