This method must return a result of type double : <pre><code>public double getBalance(int account){
    for(int i=0; i&lt;this.account.size(); i++) {
        BankAccount anAccount = this.account.get(i);
        if(anAccount.getAccountNumber()==account) {
            double balance = anAccount.getBalance();
            return balance;
        }
    }
}
</code></pre>

<p>The error this method gives me is that the method must return a result of type double even tho I clearly return balance which is from the getBalance() method which returns a double. Why doesn't it work? I don't understand.</p>
