Reading from a txt file
<p>I wrote a method that adds 1 to an <code>int</code> called <code>total</code> each time it sees a new word:</p>

<pre><code>public int GetTotal() throws FileNotFoundException{
    int total = 0;
    Scanner s = new Scanner(new BufferedReader(new FileReader("Particles/Names.txt")));
    while(s.hasNext()){
        if(s.hasNext()){
            total++;
        }
    }
    return total;
}
</code></pre>

<p>Is that the right way to write it?</p>
