我在一个文件 中写了两个类,
类一中: 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>请问为什么?
类一中: 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>请问为什么?
解决方案 »
- 诚求各位解答:不同网段不能通信是IP软件之规定吗?
- 输出 byte 数组时,怎么有了 "-" ,是什么意思呢
- 求助javabean3.15中文版在哪有下的?IntelliJ IDEA谁有解码的?
- 关于java 文档资料的问题
- 【源码分享】Java实现愤怒的小鸟
- 用Java如何构建树视图
- 有关applet的问题
- 怎样在WIN98\WIN200设置 JBuilder7
- 请问java程序里面如果改系统时间?只剩下50分了……
- A ref = new A()的执行顺序问题
- HttpURLConnection抓取页面资源问题
- JTable中remove(r)与fireTableRowsDeleted(r, r)区别?
你可以使用Section的全称:包名.Section