How to compare the values in both hash maps with the help of keys ? Since the keys are identical whereas values are\'nt. and return boolean result for each key comparision. like
Map map = new HashMap();
map.put("AA","aaa");
map.put("BB","bbb");
map.put("CC","ccc");
map.put("DD","ffffd");
Map map2 = new HashMap();
map2.put("BB","bbb");
map2.put("AA","aaa");
map2.put("DD","ffffd");
map2.put("CC","ccc");
if(map.equals(map2))
{
System.out.println("Eql");
}
else
{
System.out.println("Not");
}