Java Utililty Methods Array Max Value

List of utility methods to do Array Max Value

Description

The list of methods to do Array Max Value are organized into topic(s).

Method

intmaxValueInRemainingListElements(String[] numberList, int initialIndex)
For an array of numbers, finds the max individual value from these numbers.
int maxVal = 0;
int index = initialIndex;
while (index < numberList.length) {
    if (numberList[index].length() > 0) {
        maxVal = Math.max(maxVal, Integer.parseInt(numberList[index]));
    index += 1;
return maxVal;
intmaxValuePos(final float[] in)
max Value Pos
float maxVal = 0.0f;
int maxPos = 0;
for (int i = 0; i < in.length; i++) {
    if (in[i] > maxVal) {
        maxVal = in[i];
        maxPos = i;
return maxPos;
floatmaxY(final float[] vertices)
max Y
float maxY = vertices[1];
for (int i = 0; i < vertices.length / 2; i++) {
    maxY = Math.max(maxY, vertices[i * 2 + 1]);
return maxY;