• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Reading file in and sperating it out :URGENT

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic