A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Java in General
Reading Text file data into an array
Joined: Jun 22, 2009
Oct 10, 2009 10:41:59
I would like to know if I can read the text file data into an array. Each word in my text file should be stored into array.
Thank you in advance..
Joined: Oct 13, 2005
Oct 10, 2009 11:27:45
You would have to count the lines first, then you know what size of array to use. Then reading into the array is quite easy.
Might be better to read into a List<
> then convert the List to an array, because that saves you the counting.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Reading Text file data into an array
Can we write in a file from an array???
Can we write in a file from an array?
JDBC for loading data into SQL Server
read string from textfile into array
File into object stream
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014