Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Filling parallel arrays with input from text file.

801489Sep 14 2008 — edited Sep 14 2008
Hello,
I posted earlier about a grade class in "digits to numbers" and I am now working on an application for it. I need to create a set of parallel arrays to hold 60 entries; an array of student ids, an array of grade instances. For this I need to use the data from a text file to load the arrays. In the text file the fields are (id, name, each score) and are in the CSV format. I know I will have to split() this students information to move along furthur. The part I do not get is How do I use the data from the text file to fill the array?

I mean...use file reader? or scanner? and if I pick one of them, how do i fill just student ids from the whole text file? and how about the grade instances? I am confused. If anyone will point me in the right direction I would appreciate it.

Thanks-
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2008
Added on Sep 14 2008
23 comments
2,064 views