A basic chat program I wrote has several key words that generate special actions, images, messages, etc. I store all of the key words and special functions in a HashMap. Key wor
If you need access to both key and value then this is the most efficient way
for(Entry e : m.entrySet()) { String key = e.getKey(); String value = e.getValue(); }