Dirk,
thanks for your reply.
The strings are basically always the same, except that there can be a middle name.
May, April F 255-2190 1 5 2 3 3 2 3 3 2 3 5 5
or
May, April June F 255-2190 1 5 2 3 3 2 3 3 2 3 5 5
So my strategy was to read in the file line by line and store each line in a listArray. Then, when the file is read completely, I would want to get one String at a time and split the string so that i can store the information in a Person array (Person is a class that I wrote to store name phone, gender, etc). So my problem is, how do i know if there is a middle name or not? I was thinking I would check with the length() method if the string is longer than one, which means I havent reached the gender yet. However, what if the user gives only middle initial? Do I just have to require them to write out the whole middle name?
I have played around with it a little bit, but the code I wrote seems to be too repetitious and complicated. I am quite sure there is an easier way to do the task. Anyway, I put the code here, so that I can embarrass myself...
So this code works fine, except for the case when there is a middle name. however, as i mentioned, I think there should be an easier way to accomplish my task.
Thanks for any help!
[ edited to break apart long unbroken comment line in code block (and to remove the evil tab characters -ds ]
[ April 10, 2004: Message edited by: Dirk Schreckmann ]