Fudgie Braun wrote:So you're saying I need to put the input text file into an array?
But before I put that into an array, I need to change each line into a string then put all those into the array?
No. You asked what parsing was, and I was trying to explain that, using your problem as an example.
What you need to do is figure out your algorithm. Forget about java, arrays, parsing...just think in English (or whatever your preferred natural language is...). start describing what you need to do, step by step. then go back and refine each step, making them more detailed and explicit. For example:
open the file
as long as there are more lines in the file
read a line
look at each number in the line
add 1 to a counter for each number found on that line
When the steps are clear enough, start coding. Code the smallest amount you can, then compile, test and debug. I generally go 2-3 lines AT MOST before i recompile. So my first go would be simply trying to open the file, then close it, without getting an error. I would not try reading it, printing it, or doing anything else...literally just open and close without error.
THEN I'd go back and try reading a line and printing it.
THEN i'd go back and try reading each line, and printing each, one after the other.
THEN I"d go back and try adding anotehr tiny piece...