Compare data in two arraylist and do update in java
<p>I am new to java and I would like to know if it is possible to do the following:</p>

<p>I have two different list of array</p>

<p><strong>List A</strong>  </p>

<pre><code>1111,A,B,C  
1111,E,E,F  
1111,Z,Z,Z  
2222,C,D,E  
4444,E,E,E  
.....  
</code></pre>

<p><strong>List B</strong>  </p>

<pre><code>1111,123,N  
2222,222,Y  
3333,333,N   
4444,444,N  
.....
</code></pre>

<p>So basically, List A will have duplicate value in column 1.</p>

<p>What I would like to do is to </p>

<ol>
<li><p>Search List B using column 1 data from List A.  After it finds a row in List B that matches the data (i.e. 1111), it updates List B, column 3 with a certain value (i.e.N).   </p></li>
<li><p>Later on when I process List B, depending on the value in column 3 for each row, I know I need to go to List A to get the data.    </p></li>
</ol>

<p>Now I would like to know how I can do it?  Also, when I do #2 above, there are duplicate rows for one value (i.e. 1111), how can I make sure I have got all data?</p>

<p>Any suggestions are greatly appreciated.</p>

<p>Thanks</p>
