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 Java 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java 2" Watch "Java 2" New topic
Author

Java 2

sheharyar alam
Greenhorn

Joined: Mar 04, 2008
Posts: 4
hello guys

I am new at this stuff, so I am trying to learn this java stuff lol,

but anyway

My qustion is how do I Read text line by line and print it as it appears in the given data file
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Welcome to JavaRanch!

Take a look at the Scanner class.

If you're having trouble with it, show us what you've tried and where you're stuck.


"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
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

BufferedReader is another option, as it has a readLine() method. This does strip away the newline characters though, but I believe so does Scanner.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java 2