I was creating a map from characters to their corresponding Morse code and back; Is there a better way in Java, rather than manually populating two separate HashMaps?
What I did was make 2 private maps, one for char to morse and morse to char, then populated one of them manually. you could then loop through that map, reverse the key and value, and add it to the other map. hope this helps