Question: How would I read data from a csv file into an array of objects in Java? The Array of objects should be called People So
How would I read data from a csv file into an array of objects in Java?
The Array of objects should be called People
So in this case I want the first 3 records to be in order of: name, age, id
e.g:
Jeff, 19, 1
Mark, 12, 2
Holly, 15, 3
I want the above to go into the Peoples array of object slot as: People[0], People[1], People[2]
And then I want the next three records in the csv file to be in the order of just name and age
e.g:
Ben, 20
Jake, 22
Mel, 24
I want the above to go into the Peoples array of object slot as: People[3], People[4], People[5]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
