Local method variable, unrecognized
<p>I have a method <code>public int bar()</code>, where i have declared an <code>int total</code>(in the method body ofc). So this should be a simpel local variable, the thing is that eclipse complain about</p>

<pre><code>Description Resource    Path    Location    Type
The local variable total may not have been initialized  Repository.java /proj_individual/src/repo   line 35 Java Problem
</code></pre>

<p>general example :</p>

<pre><code>public int foo(){
    int total;
    for(... : ...){
        total += 1; // complains
    }
    return total;// complains
}
</code></pre>

<p>and my exact code:</p>

<pre><code>public int getLocatars(){
    int total;
    for ( Map.Entry&lt;Apartment, List&lt;Expense&gt;&gt; entry : dic.entrySet() ) {
        if(entry.getKey().isDebt()){
            total += entry.getKey().getNrProple();
        }
    }
    return total;
}
</code></pre>

<p>I have no idea what I may have done wrong, so any idea is helpful, thank you.</p>
