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 are storing keys/values as strings, then this will work:
HashMap newMap = new HashMap(); newMap.put("my_code", "shhh_secret"); String value = newMap.get("my_code");
The question is what gets populated in the HashMap (key & value)