i wanaa compare 2 array list and find the uncommon data in 3rd arry list
i have written below code
ArrayList db2Crns=new ArrayList();
ArrayList oracleCrns=new ArrayList();
ArrayList leftOverCrns=new ArrayList();
db2Crns=testDB2Connect.getDb2LoggedInCrns();
oracleCrns=testOracleConnection.getDataFromPartyAuditInfo();
int array1Size = db2Crns.size();
int array2Size = oracleCrns.size();
System.out.println(db2Crns.size());
System.out.println(oracleCrns.size());
for(int i=0;i<oracleCrns.size();i++)
{
String val=oracleCrns.get(i).toString();
int k=0;
for(int j=0;j<db2Crns.size();j++)
{
if(oracleCrns.get(i)==(db2Crns.get(j)))
{
k++;
}
}
leftOverCrns.add(val+k);
}
System.out.println(leftOverCrns.size());
/* for(int x=0;x<leftOverCrns.size();x++)
{
System.out.println(leftOverCrns.get(x));
}*/
o/p is :
13494
11529
11529
BUT REQUIRED OUTPUT IS:
11524
13494
1970(13494 - 11524)
please do the needful.