I have a CSV file with the following columns: id, fname, telephone, lname, address.
id
fname
telephone
lname
address
I have a P
P
SimpleFlatMapper can do that easily see Getting Started csv using the headers of the csv or by manually specifying which columns map to what property.
CsvParser .mapTo(MyObject.class) .forEach(file, System.out::println);