How can i write a program that sums up, how many times number of a txt file from 1-9, 10-19 etc appears?
<p>i have an JAVA assigment of university that has to be completed for tomorrow, and I dont know how to solve this. This is the assignment:</p>

<p>I have an .txt containing:</p>

<pre><code>2000
I
Achraf Belmokadem                    2355 22
Richard van Heuven van Staereling    1355 95
Shan Shan                            2315 100
=W
Wartie Zeggen                        4311 19
Melissa de Wit                       2041 99
Enes Goktas                          1195 74
-
2001
I
enz...
</code></pre>

<p>The file holds information on how well a program fared against other programs
of other students of different academic years. Each academic year is separated
by a '-'. Each year starts off with a number, declaring which year the statistics
concern. After this, the file shows how well the program fared against students
of different studies. Each study is seperated by a '='. Next, each individual
match is declared. First, the name of the student is shown followed by a TAB
('\t'). The next number shows how long the program had to think against
this player. The last number is the percentage of pieces that the program has
conquered. (The programs of students played a game)</p>

<p>My assignment is to print how often the program  has ended with 0-9%, 10-19% ... 90-100%.</p>

<p>This is how far I came..</p>

<pre><code>void printNames(Scanner nameScanner) {
    nameScanner.useDelimiter("\t");

    String name = nameScanner.next();
    int thinkingTime = nameScanner.nextInt();
    int takenStones = nameScanner.nextInt();
</code></pre>

<p>I can't figure out how to use scanners and delimiters to sum those numbers up and sort them into 1-9, 10-19..... How can I solve this? </p>
