Saturday, 29 September 2018

Java program to read CSV FILE

import java.io.*;

public class readfile {
 public static void main(String x[]) throws IOException{
   int i=0;
   BufferedReader b=new BufferedReader(new FileReader("cs.csv"));
   String[] user=new String[50000];
   String line="";
    while ((line = b.readLine()) != null)
    {
       user[i]=line;
       System.out.println(user[i]);   
       i++; 
    }
 }
}


No comments: