File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "reading files" Watch "reading files" New topic

reading files

Alex Johnson

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

Joined: Mar 22, 2005
Posts: 42965
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.
Alex Johnson

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

Joined: Oct 14, 2009
Posts: 5
I agree. Here's the link:
subject: reading files
jQuery in Action, 3rd edition