I have a HashMap with various keys and values, how can I get one value out?
HashMap
I have a key in the map called my_code, it should contain a str
my_code
If you will use Generics and define your map as
Map map = new HashMap();
then fetching value as
String s = map.get("keyStr");
you wont be required to typecast the map.get() or call toString method to get String value