I have two hash maps like the following:
1.=============Employee=================
Key : 1_10 : Value : 13/04/2012
Key : 1_11 : Value : 18/04/2012
Key : 1_
below is the code which works perfectly, the reason why the comparison failed is the map value is different .
Key : 27 : Value : 27/4/2012, Key : 1_18 : Value : 27/04/2012
if we see the dates, the difference is clearly seen. 27/4/2012 is different from 27/04/2012 since i stored it as a string.
Iterator> holyDayiterator = workingdayMap.entrySet().iterator();
while (holyDayiterator.hasNext()) {
Map.Entry holiDayEntry = holyDayiterator.next();
if(!employeeMap.containsValue((holiDayEntry.getValue()))){
System.out.println("works perfect");
}
Thanks guys for your support and people who have gave down vote also.
:) Tony