Java: library to calculate the mean?
<p>Is there a function in Jave to calculate the mean ?</p>

<p>I've tried by myself but I'm afraid that sum has too high value: 5 642 782 840</p>

<p>Can a integer be 5 642 782 840 in Java ? I don't think so...</p>

<pre><code>for (int i = 0; i &lt; timeValues.length; i++) {               
    sum = sum + Integer.parseInt(timeValues[i]);
}
   time = Integer.toString(sum / timeValues.length);    
</code></pre>

<p>thanks</p>
