This should be a fun introduction to the Collections family. See the JavaDoc for Map. Some of the methods you'll want to use:
The key-value pairs will come back in a Set of MapEntry objects. Look up the
doc for Set, find iterator() and follow the links on Iterator. You can get MapEntry objects with that, and then get all the keys and values from there.
Any time you get stuck, Google for "java map example" or something like that. Start up some code and show us what you make. We can really help you best when you have code that almost works.