Printing a java map Map – How?
I’m sure there’s some nice library that does this sort of thing already for you… But to just stick with the approach you’re already going with, Map#entrySet gives you a combined Object with the key and the value. So something like: will do what you’re after. If you’re using java 8, there’s also the new streaming approach.