OK, I have to just be brain dead, but I cannot figure out were this null error is. I have looked and the lines and just don't see anything. The error message is:
Exception in thread...
Type: Posts; User: jimbo62
OK, I have to just be brain dead, but I cannot figure out were this null error is. I have looked and the lines and just don't see anything. The error message is:
Exception in thread...
OK, the file contains the correct data, even numbers on the 1st line and odd on the 2nd line. And now it wants to work adding a second
System.out.printf(reader2.readLine()); Didn't like it...
The output is supposed to be:
2, 4, 6, 8, ........... 96, 98, 100
2, 4, 6, 8, ........... 96, 98, 100, 1, 3, 5, 7, ..........95, 97, 99
I get:
2, 4, 6, 8, ........... 96, 98, 100,
2, 4, 6, 8,...
I thought that the code below was supposed to take care of that:
BufferedWriter writer2 = new BufferedWriter(new FileWriter(newFile, true));
OK, time to give the noob a hard time. I am writing a program that is supposed to use an algorithm to write all even integers from 1 to 100 to a file, close the file, then display the results. Then...