Java: grabbing second highest
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2615712/finding-the-second-highest-number-in-array">Finding the second highest number in array</a>  </p>
</blockquote>



<p>I have this,</p>

<pre><code>       for(int i=0;i&lt;Dices.length;i++){
        if( Dices[i].getValue() &gt; highest ){
            highest = Dices[i].getValue();
        }
       }
</code></pre>

<p>to get highest value. I now want to get the second highest, how can I do it? Cant i take advantage of this highest variable for getting the second highest?</p>
