First, you should probably take a browse through the Java Tutorial - Reading and Writing chapter. Lots of good information in there for the beginner. Second, you should realize that if you do two reads before you write something out, you will not print out the results of that first read. Third, you should take a look at the documentation for java.io.BufferedReader. BufferedReader makes input more efficient by using an internal buffer to save slow disk access. It also has a convenient method for reading a line of text at a time. Using that method would be faster and easier than reading your data one character at a time.