This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Read file line by line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Read file line by line" Watch "Read file line by line" New topic
Author

Read file line by line

mic ta
Greenhorn

Joined: May 13, 2009
Posts: 28


Is it possible to read files line by line without using != null maybe with a for loop?

Best regards,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19958
    
  25

You will need to check for != null at some time. How else would you find out if you've read the entire file?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Read file line by line