This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes PrintWriter writing not more than 1050000 lines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "PrintWriter writing not more than 1050000 lines" Watch "PrintWriter writing not more than 1050000 lines" New topic
Author

PrintWriter writing not more than 1050000 lines

Jiggi Piggi
Greenhorn

Joined: Jun 30, 2009
Posts: 3
Hi

I have a program which is supposed to write huge data to a file. However when I open the output file, I can find only 105000 lines. There were no exception during the execution. Here is my code:
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 378
You seem to be writing exactly half of your requirement.
See if that gives a clue..
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20048
    
  30

See how many times you call i++ in your loop.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
jQuery in Action, 3rd edition
 
subject: PrintWriter writing not more than 1050000 lines
 
It's not a secret anymore!