Try intersection()
with Entries. It will check keys and values and return common entries.
Map<String, Integer> map1 = new HashMap<>();
map1.put("a", 1);
map1.put("b", 2);
map1.put("c", 3);
map1.put("d", 4);
Map<String, Integer> map2 = new HashMap<>();
map2.put("a", 2);
map2.put("b", 3);
map2.put("c", 4);
map2.put("d", 5);
map2.put("e", 6);
map2.put("f", 9);
Collection<Map.Entry<String, Integer>> commonValues = CollectionUtils.intersection(map1.entrySet(), map2.entrySet());
System.out.println(CollectionUtils.isEmpty(commonValues)); // if empty, then no same key and value found.
For keys alone use :
Collection<String> commonKeys = CollectionUtils.intersection(map1.keySet(), map2.keySet());