I have class in Java:
class data {
private String id;
private String name;
private String phone;
}
and I need to fill data from CSV file. But not all columns in CSV file are mandatory, or could be in different order.
CSV Example1:
id, phone, name
1,421904123456,Peter
2,420558811225,John
...
CSV Example2:
id, name
3,Alex
8,Stefan
Any advice how to do that?
May be you can also look into Execute SQL on CSV files via JDBC to query CSV using jdbc.
Also, your class should be Data
instead of data
.