I\'m a java newbie and I need a some help
so here is my main method:
RegistrationMethods dmv = new RegistrationMethods();
ArrayList I
You could use something like this:
ArrayList owners = new ArrayList();
BufferedReader br = new BufferedReader(new FileReader(new File("path/to/your/file.csv")));
String line;
while ((line = br.readLine()) != null) {
String[] entries = line.split(",");
CarOwner owner = new CarOwner(entires[0], entries[1], entries[2], entries[3]);
owners.add(owner);
}
Do you have a real csv file (all values separated by ,) or are they separated by spaces or something like that? In that case you'd have to replace the , with spaces.