algorithm - Compare the two ArrayLists in java which contains same objects -


I have the following two array lists: AccVO: Comparison, Zodiac Field

List 1:

  AccVO [001,500] ACCVO [002,600] ACCVO [003,800]  

List 2:

I have solved two lists, I have to compare two lists with the key and databay Insert in to get the record list 2.

Sample code:

 for  (AccVO accvo1: List1) {for (AccVO accvo2: List2) {if (accvo1.getCmpkey (). Equals (accvo2. GetCmpkey ())} // Enter recs in the table}}}  

My list size will be bigger, that means, to handle millions of records, I want some optimistic arguments to bridge the records. / P>

Thank you in advance

Because your lists are resolved, you You can use an index in both oranes and prefix At only a small key increases in time:

  int i = 0, j = 0; while (i  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -