This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes reading files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "reading files" Watch "reading files" New topic
Author

reading files

Alex Johnson
Greenhorn

Joined: Oct 21, 2009
Posts: 2
hey people, i am new to java and need some help..
i have a file which stores car details; owner, make, model, color, regnumber

Paul Audi A4 black MW5463
Betty RangeRover sport white MW4322
Mike Toyota hilux2.7 blue MW3421
Saun Nissan March white MW1234

the program shud accept input from keyboard and if it match any details, it outputs the line containing the detail.

i have this so far..


please help..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
Welcome to JavaRanch.

While you didn't say what is and isn't working in the code, passing an empty string as the second parameter to the StringTokenizer constructor is probably not what you want.


Ping & DNS - my free Android networking tools app
Alex Johnson
Greenhorn

Joined: Oct 21, 2009
Posts: 2
its not about the empty parameter..

i want to search the keyboard input in the file and print the line it's found..

how do i do that
Tarique Islam
Greenhorn

Joined: Oct 14, 2009
Posts: 5
 
 
subject: reading files
 
Similar Threads
Reversing a string
reading files
how to read from a file ?
socket prog not working
read specific line from text file