HashMap and put warnings because unchecked calls...
I'm writting an application that connects to some APIs, but when compiling, I get some warning messages:
warning: [unchecked] unchecked call to put(K, V) as a member of the raw type java.util.HashMap
Here is the code:
publicclass hashMapMgr{
HashMap hm;
public hashMapMgr(){
hm =new HashMap;
hm.clear();
}
publicvoid addKey(String key, String value)throws myException{
Object status;
if (key.length()==0 && value.length()==0){
throwsnew myException ("Error");
}
status = hm.put(key,value);
}
public HashMap getMap(){
return hm;
}
}
Why am I getting that warning message? Should I use a try..catch to remove the warning message? or should I extend or implement something?
Thanks

