Comparing two hashmaps for equal values and same key sets?

Simply use :

mapA.equals(mapB);

Compares the specified object with this map for equality. Returns true
if the given object is also a map and the two maps represent the same
mappings

Leave a Comment