if you have two maps lets say map1 and map2 then using java8 Streams,we can compare maps using code below.But it is recommended to use equals rather then != or ==
boolean b = map1.entrySet().stream().filter(value ->
map2.entrySet().stream().anyMatch(value1 ->
(value1.getKey().equals(value.getKey()) &&
value1.getValue().equals(value.getValue())))).findAny().isPresent();
System.out.println("comparison "+b);