首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

春节快乐!关于jdk5.0的Type safety: The cast from Object to HashMap<String,Object>

2012-01-29 
春节快乐!关于jdk5.0的Type safety: The cast from Object to HashMapString,Object is actually代码ret

春节快乐!关于jdk5.0的Type safety: The cast from Object to HashMap<String,Object> is actually
代码   return   (HashMap <String,   Object> )   reqMap.get( "User_Code ");

出现   Type   safety:   The   cast   from   Object   to   HashMap <String,Object>   is   actually   checking   against   the   erased   type   HashMap

reqMap也是HashMap <String,   Object> 类型,
怎么去除警告?

[解决办法]
((HashMap <String, Object> ) reqMap).get( "User_Code ");
注意优先级别

热点排行