I have a file with some data separated by semicolon. I'm trying to build a stream, which will read file line by line, separate every column of data and map it to new object.
data.txt:
John;Smith;42;shopassistant
Clara;Lefleur;24;programmer
Person.class:
public class Person{
String name;
String lastName;
int age;
String job;
}
I started with something like this:
List<Person> people = Files.lines(Paths.get("src/data.txt"))....
Any ideas?