This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes set id Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "set id " Watch "set id " New topic
Author

set id

Lucas McDaniels
Greenhorn

Joined: Feb 07, 2011
Posts: 7
How would I go about setting an Id from a customers list (text file)? so that it can be read by another method?

Thanks for the help,
Sloshy
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Welcome to the Ranch!

It sounds like the basic approach will be:
  • Read the text file (get the contents into your Java program as a String so you can work with it).
  • Find the value you're looking for in the String (parse it into separate pieces and identify what you need).
  • Assign the desired value to some variable so it can be passed/accessed.


  • Does that make sense? If so, which part are you having trouble with? Have you tried reading the file? Do you have any code you've tried so far?


    "We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
    sscce.org
     
    Consider Paul's rocket mass heater.
     
    subject: set id