Possible Duplicate:
Finding the second highest number in array
I have this,
for(int i=0;i<Dices.length;i++){
if( Dices[i].getValue() > highest ){
highest = Dices[i].getValue();
}
}
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?