How can I best compare two HashMaps, if I want to find out if none of them contains different keys than the other, and if the values of that keys match each oth
Make an equals check on the keySet() of both HashMaps.
NOTE:
If your Map contains String keys then it is no problem, but if your Map contains objA type keys then you need to make sure that your class objA implements equals().