• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading set of files

 
Banu Maga
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to read and fetch data from a set of text files say, some 20 files from a same folder.?
I also need to campare the file names and put a particular file in some other location.
I have tried to create array of file objects, but how to add the files
to the array.

I am a fresher and my working experience is 2 months...

Thanks,
Banu
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15627
46
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't know how to use arrays, look at the tutorial: Learning the Java Language - Arrays.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, welcome to the ranch!

It's easiest for us to figure out what you need to know next if you show us what you've done so far. See if that tutorial on arrays fits your question. If not, post some code and we'll see what we can do.

Two tips: 1) Update your profile so your name is a believable (if not actually true) first and last name. Obvious fakes, like Brad Pitt, will get you in trouble. 2) If you post code, keep it fairly short and to the point and use the "CODE" button below the editor to preserve your formatting.

Have fun with Java!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic