Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to compare two hashmaps in java?
    primarykey
    data
    text
    <p>I have two hash maps like the following: </p> <pre><code>1.=============Employee================= Key : 1_10 : Value : 13/04/2012 Key : 1_11 : Value : 18/04/2012 Key : 1_12 : Value : 19/04/2012 Key : 1_14 : Value : 23/04/2012 Key : 1_13 : Value : 20/04/2012 Key : 1_16 : Value : 25/04/2012 Key : 1_1 : Value : 02/04/2012 Key : 1_15 : Value : 24/04/2012 Key : 1_18 : Value : 27/04/2012 Key : 1_3 : Value : 04/04/2012 Key : 1_17 : Value : 26/04/2012 Key : 1_2 : Value : 03/04/2012 Key : 1_5 : Value : 06/04/2012 Key : 1_19 : Value : 30/04/2012 Key : 1_4 : Value : 05/04/2012 Key : 1_7 : Value : 10/04/2012 Key : 1_6 : Value : 09/04/2012 Key : 1_9 : Value : 12/04/2012 Key : 1_8 : Value : 11/04/2012 2.=============Working day================= Key : 27 : Value : 27/4/2012 Key : 02 : Value : 02/4/2012 Key : 26 : Value : 26/4/2012 Key : 19 : Value : 19/4/2012 Key : 11 : Value : 11/4/2012 Key : 04 : Value : 04/4/2012 Key : 30 : Value : 30/4/2012 Key : 06 : Value : 06/4/2012 Key : 13 : Value : 13/4/2012 Key : 09 : Value : 09/4/2012 Key : 03 : Value : 03/4/2012 Key : 23 : Value : 23/4/2012 Key : 20 : Value : 20/4/2012 Key : 16 : Value : 16/4/2012 Key : 10 : Value : 10/4/2012 Key : 18 : Value : 18/4/2012 Key : 25 : Value : 25/4/2012 Key : 17 : Value : 17/4/2012 Key : 12 : Value : 12/4/2012 Key : 24 : Value : 24/4/2012 Key : 05 : Value : 05/4/2012 </code></pre> <p>Keys are not same but the values are same and sometime the values are not same.</p> <p>i want to find out the value which are not present in <code>employeemap</code> when comparing with <code>workingdaymap</code></p> <pre class="lang-java prettyprint-override"><code>if (!employeeMap.containsValue(workingdayMap.get(wKey))) { //take the value which is not present in employeeMap which is present in workingdayMap } </code></pre> <p>but it gives me null from employeeMap.</p> <p>Could you please help me to solve this?</p> <p>Regards Tony</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload