0
List<First> listfirst(String dir){
try {
List<First> list=new ArrayList<First>();
CSVReader reader = new CSVReader(new FileReader(dir));
String [] nextLine;
while ((nextLine = reader.readNext()) != null) {
// nextLine[] is an array of values from the line
list.add(new First(nextLine[0], nextLine[1], nextLine[2],nextLine[3], nextLine[4],nextLine[5], nextLine[6], nextLine[7]));
}
return list;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
有1994行。但是這個代碼只打印了388行。我該怎麼辦?用opencsv讀取csv