After the code has read a line of text from the file into a String,
use the split() method to separate the tokens on that line into elements in an array.
The code should use the nextLine() method...
Type: Posts; User: Norm
After the code has read a line of text from the file into a String,
use the split() method to separate the tokens on that line into elements in an array.
The code should use the nextLine() method...
What happens when it is executed? The output will show you.
I'd read the file line by line and split the line into parts vs token by token.
Please edit your post and wrap your code with code...
The String class's split() method would be good with a CSV file.
Divide the program up into several steps.
Start by reading the file into Strings
and parsing the Strings into the parts with the different values.
Make a list of the teams.
Build the totals...
Also posted at: Read CSV files and organising the data in Java