I have a CSV file, format as follows:
City,Job,Salary
Delhi,Doctors,500
Delhi,Lawyers,400
Delhi,Plumbers,100
London,Doctors,800
London,Lawyers,700
London,Plumbers,
The first line contains the word "Salary" in the third spot. Put br.readLine()before the loop and everything should be fine.
You have:
br = new BufferedReader(new FileReader(csv));
try {
while ((line = br.readLine()) != null) {
Change it to:
br = new BufferedReader(new FileReader(csv));
br.readLine()
try {
while ((line = br.readLine()) != null) {