Import java. Io. bufferedreader;
Import java. Io. file;
Import java. Io. filenotfoundexception;
Import java. Io. filereader;
Import java. Io. ioexception;
Import java. util. arraylist;
Public class CSV {
@ Suppresswarnings ("null ")
Public arraylist readtext (string DIR) throws ioexception {
File sampledir = new file (DIR );
Filereader samreader = new filereader (sampledir );
Bufferedreader sambr = new bufferedreader (samreader );
String word = new string ();
Stringbuffer words = new stringbuffer ();
Arraylist arr = new arraylist ();
While (WORD = sambr. Readline ())! = NULL ){
Words. append (Word );
// Word = sambr. Readline ();
}
String wordss = words. substring (0 );
String W [] = wordss. Split (",");
For (INT I = 0; I <W. length; I ++ ){
Arr. Add (W [I]);
}
For (Int J = 0; j <arr. Size (); j ++ ){
System. Out. println (ARR. Get (j ));
}
Return arr;
}
Public static void main (string [] argv) throws ioexception {
String dir = "D:/input.txt ";
CSV c = new CSV ();
C. readtext (DIR );
}
}