This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Did you get the code to work? In the instance with the iterator which you commented out, tryThat should work. The second attempt at printing looks all right from here. I presume it worked? In fact you seem to have two decent solutions to your problem
Better to declare the Map as Map<String, String> resultMap = new HashMap<etc>(); That way you can swap to a different implementation very easily.