Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading file in and sperating it out :URGENT  RSS feed

 
Roberto Favaro
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,
Im really stuck.Im trying to select a file and read its data.I want to seperate this data out so I can assign it to variables. I dont know if i need input streams???.Could someone please help me......

example of data to be read from file
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set this aside for a minute and put together the smallest program you can that shows where you are stuck. I pulled these lines from different places in your code:

If you put that in the main() of a tiny new class, does it work? Does that answer the question about needing streams? What do you want to do to each line next?
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you taken a look at our FAQ, How To Ask Questions On JavaRanch? It has sections like Ease Up and Isolate The Problem that will help us help you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!