I'm trying to check if a row of a csv file is present in another csv file. My code is the following:
public void readIncassiOLG(String filename,List<String []> itemsToCheck){
CSVReader reader = new CSVReader(new FileReader(filename),CSV_SEPARATOR);
List<String []> body = reader.readAll();
for(String[] item : itemsToCheck){
if(body.contains(item)){
System.out.println("Item present");
}
else{
System.out.println("Item not present");
}
}
}
items to check (itemsToCheck) are the rows filtered from first file, I checked that there are some row in both files, but the following method print me always "Item not present".
Any suggestion about this?