日期:2014-05-20  浏览次数:20643 次

泛型相关的问题
Map<String, RuntimeMonitor.ProcessCHeapInfo> gap = rt.getCHeap();
Iterator it = gap.entrySet().iterator();


就这么段代码,为什么第2行那里仍旧会提示 Iterator is a raw type.References to generic type Iterator<E>should be parameterized

...至今对泛形一头雾水,请各位大大指点一二

------解决方案--------------------
Iterator <Map.Entry <String,RuntimeMonitor.ProcessCHeapInfo > > it = gap.entrySet().iterator();