If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Read text from a file and hold in an array

Hi Im trying to read lines from an external file and hold them in an array for future use using java.
I can read the file and print its contents but im not sure on the next step to hold the info in the array.

The information in the file looks similar to this
00001 1 3 2
00002 3 2 1

With first number is the number of a ballot paper and the next three numbers are ranks of three candidates by preference.

You can use some collections like arrayList of objects or something to store the data.
Create a class with application wide scope and store the details. You can make the static or something depending on your requirement