Java: is this way of finding the maximum value in an integer array correct?
<p>I'm trying to find the highest value in an array of integers. I'd prefer not to use doubles anywhere.</p>

<pre><code>public static int findMax(int...vals) {
    int max = Integer.MIN_VALUE;
    for (int d: vals) {
        if (d &gt; max) max = d;
    }
    return max;
}
</code></pre>