I want to read a csv file and separate out and store in String each comma separated values. I am stuck at reading a single line at a time. Can anybody please show me a piece of code to do these?
Don't forget to allow for values that have commas embedded in them and for blank values, and probably other quirks of csv that I haven't thought of. There are a number of java csv parsers available that handle all these things. Try googling 'java csv parser' - it's better than reinventing the wheel.