reading text file
here is what im trying to figure out. I need to read a text file into a program evaluate the content and place in an array for future use. Heres how a line of text looks:
tab is whitespace between the Long values.
always 2 Long values
0 (tab) 1454
I am using Scanner and have found a way to accomplish this, but I know there is an easier way.
is there any way I can do this : Line = 0 (tab) 1454
and break that down into two variables.
S1 = 0; S2= 1454;
One solution: Read in a line and then use String#split(String regex) to split it into two.
Another: use another Scanner object to read in the line via nextLong().