Did you print out some of the integers and floats that were counted incorrectly?
Can you post them and the debug print outs from the methods that tested them?
Write a simple testing program...
Type: Posts; User: Norm
Did you print out some of the integers and floats that were counted incorrectly?
Can you post them and the debug print outs from the methods that tested them?
Write a simple testing program...
Make a small input file, add printlns as I described to print out the results as each line is read.
Execute the program and look at the output and see if it is correct. If not then add more printlns...
Try debugging the program by adding printlns to the code that track the execution and show the results of each test line by line and value by value.
Print out each line as it is read, then print...
Are the count like this:
wrong vs correct
64 vs 129 ints
29 vs 30 words
3 vs 68 floats
0 vs 6 invalid
Can you post the program's output and also post what the output should be.
For testing I'd use as small a file as possible so it is easy to see which numbers are wrong.