0
Array
How to find maximum and minimum value in an array in Java language.
4 Antworten
+ 1
Tnx
0
Try this function
public static int max(int... array) { if (array.length == 0) { // ... } int max = array[0]; for (int a : array) { if (a > max) max = a; } return max; }
0
Tnx