Forums Register Login

Array List from a text file

+Pie Number of slices to send: Send
Hi all.
hope this is the right place to post!
My question is i have a text file with 10 lines, each line has different parts eg name, age, height etc, want i want to do is create an array so each line has its own array 'box'
eg
line one of the text file goes into array position 0
line two goes into array position 1
etc etc
Any help would be great!

many thanks...............
+Pie Number of slices to send: Send
Standard homework problem... The easiest way to start this is probably to just start it -- don't worry about the design or optimizing it, etc.

Do you know how to open and read files? Do you know how create arrays? Do you learned to do loops yet? Take a shot at the assignment, but make sure to read up on files, arrays, and loops, from your text book, if you get confused.

Henry
+Pie Number of slices to send: Send
And welcome the the Ranch
+Pie Number of slices to send: Send
Apache Commons has some handy IO utilities. Apache Commons IO
+Pie Number of slices to send: Send
Do you intend to create objects to encapsulate all those variables from the text file?
They weren't very bright, but they were very, very big. Ad contrast:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 970 times.
Similar Threads
How to iterate through an Array of objects and a file at the same time?
How to crate Array in ANT
StringTokenizer
How to read a formatted text file into objects
Reading IE favorite shortcut url?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:47:30.