try {
CSVReader input = new CSVReader(new FileReader("s.csv"));
String[] data;
while (( data = input.readNext()) != null) {
String id = data[0];
String name = data[1];
String password = data[2];
String number = data[3];
String gender = data[4];
String mail = data[5];
String department = data[6];
}
for(int i=0;i<data.length;i++) //length is the property of the array
System.out.println(data[i]);
System.out.println("==========================");
}
catch (Exception ex) {
System.out.println("hiiii");
}
I wanted to read the contents from a CSV file and print it in console. I have set the class path and everything is fine
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/ObjectUtils