I'm trying to write my first I/O program and I seem to have a problem with using the BufferedReader class. Every time I read in from a .txt document and then print out to a different one it prints out every other line, starting with the second line. I'm pretty sure it is not the PrintWriter's fault because I did not have a problem with printing strings I defined in the program. When I put a line space in between each line the output was the way I wanted, but the file is a dictionary file with hundreds of thousands of words so I can't possibly manually enter all those spaces. Could someone please help me with this problem? I was told something about using flush, and I set the automatic flush argument to true for the PrintWriter, which didn't seem to have any effect.


LinkBack URL
About LinkBacks
Reply With Quote
by clicking the
button on their useful posts. 