hi, i am getting below error plz help
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at com.kotak.autoblocknb.transaction.Transaction.main(Transaction.java:38)
ArrayList<Integer> db2Crns=new ArrayList<Integer>();
ArrayList<Integer> oracleCrns=new ArrayList<Integer>();
ArrayList<Integer> leftOverCrns=new ArrayList<Integer>();
db2Crns=testDB2Connect.getDb2LoggedInCrns();
oracleCrns=testOracleConnection.getDataFromPartyAuditInfo();
for(int i=0;i<db2Crns.size();i++)
{
int x=db2Crns.get(i).intValue();
int y=oracleCrns.get(i).intValue();
if(x!=y)
{
leftOverCrns.add(db2Crns.get(i));
leftOverCrns.add(oracleCrns.get(i));
}
else if(x==y)
{
leftOverCrns.add(oracleCrns.get(i));
}
}
int lastIndexOfOne=db2Crns.size();
for(int i=lastIndexOfOne;i<oracleCrns.size();i++)
{
if(leftOverCrns.contains(oracleCrns.get(i)))
{continue;}
else
leftOverCrns.add(oracleCrns.get(i));
}
for(int i=0;i<db2Crns.size();i++)
{
if(leftOverCrns.contains(db2Crns.get(i)))
{
leftOverCrns.remove(db2Crns.get(i));
}
}
System.out.println("Leftover CRN are,");
for(Integer i:leftOverCrns)
{
System.out.println(+i);
}
}
}