For some reason, I'm getting an error. It doesn't seem to be reading my "input.txt" file. I'm trying to read the "input.txt" file which consits of random integers and use insertion sort to sort them in order. Then, i want to have the sorted integers go the file "output.txt"
If you are seeing "ERROR", you're throwing away valuable information. Replace the println() line with "e.printStackTrace();" This will tell you what type of error (file not found, end of file, unreadable file) and the line number where it occured.
If you're not seeing "ERROR" and the program exits normally but your output is wrong, you need to tell us how it's wrong.
Do you have a linefeed at the end of the file after the last digit of the last number? [ January 30, 2005: Message edited by: David Harkness ]