- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathReadCSVFileOpenCSVReader.java
More file actions
Latest commit
30 lines (21 loc) · 669 Bytes
/
Copy pathReadCSVFileOpenCSVReader.java
File metadata and controls
30 lines (21 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
packagedemoproject;
importjava.io.FileNotFoundException;
importjava.io.FileReader;
importjava.io.IOException;
importcom.opencsv.CSVReader;
publicclassReadCSVFileOpenCSVReader {
publicstaticvoidmain(String[] args) throwsIOException {
longstart = System.currentTimeMillis();
CSVReadercsvReader = newCSVReader(newFileReader("C:\\Users\\pc\\Desktop\\democsv.csv"));
String[] data;
while ((data = csvReader.readNext()) != null) {
for (Stringstring : data) {
System.out.print(string + " ");
System.out.println();
}
longend = System.currentTimeMillis();
System.out.println();
System.out.println(end - start);
}
}
}