I want to read huge data from CSV, containing around 500,000 rows. I am using OpenCSV library for it. My code for it is like this
CsvToBean c
Read line by line
something like this
CSVReader reader = new CSVReader(new FileReader("yourfile.csv")); String [] nextLine; while ((nextLine = reader.readNext()) != null) { // nextLine[] is an array of values from the line System.out.println(nextLine[0] + nextLine[1] + "etc..."); }