File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 39547
    
  27
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 - updated with new look and Ping home screen widget
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading files
 
Similar Threads
reading files
read specific line from text file
how to read from a file ?
Reversing a string
socket prog not working