I implemented a program which stores all the lines of an CSV file in a hashlist. But it is beginning at the first row of the csv file. I use the Bufferreader to read the lines and store them in a array list . But how can I also take the headers of the csv file? Should I implement that in the buffer reader as well? And how?
I would start by looking at different ways to read files. They are often better than trying to write your own CSV reading program.
You can of course simply miss out the first line. Or read one line.If you change skip(...) to limit(...) in line 7, you can get only the header.