I will explain the scenario, I have two hash maps lets take
Map<String,String> map_A = new HashMap<>();
mapA.put("Name", "Jerry");
mapA.put("State", "Texas");
Map<String,String> map_B = new HashMap<>();
mapB.put("Name","TOM");
mapB.put("State", "Texas");
My keys will be same in all cases.
Expected output :
Name Jerry TOM mismatched
I need to print only in case if there is a mismatch.