float[] behavior
<p>Im sure there is a simple answer to this and I will feel stupid in a few mins but here it goes, it's late and im tired....</p>

<p>So, can i ask, why does this code...</p>

<pre><code>public class TestProcess {

    final float[] finalFloats = {0.9f,0.8f,0.7f};
    float[] floats;

    public static void main(String[] args) {
        new TestProcess();      
    }

    public TestProcess(){
        floats = finalFloats;
        printTotal();
        floats[0]=0.1f;
        printTotal();
        floats = finalFloats;
        printTotal();
    }

    void printTotal(){
        float count = 0f;
        for(float f : floats){
            count+=f;
        }
        out("Count:"+count);
    }

    void out(String s){
        System.out.println(s);
    }

}
</code></pre>

<p>give this output</p>

<pre><code>Count:2.4
Count:1.6
Count:1.6
</code></pre>

<p>When i would expect</p>

<pre><code>Count:2.4
Count:1.6
Count:2.4
</code></pre>

<p>i feel very stupid...!</p>

<p>This question has also been asked <a href="http://forums.sun.com/thread.jspa?threadID=5445078&amp;tstart=0" rel="nofollow">link text</a>, I will post here if it gets answered on the other forum.</p>
