Java Array Max Value maxValue(int[] arr)

Here you can find the source of maxValue(int[] arr)

Description

max Value

License

Open Source License

Declaration

private static int maxValue(int[] arr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static int maxValue(int[] arr) {
        int max = arr[0];
        for (int i : arr) {
            if (i > max) {
                max = i;/*  ww  w. j a v a  2 s  .c  o  m*/
            }
        }
        return max;
    }
}

Related

  1. maxSum(int[] array)
  2. maxValue(double[] ary)
  3. maxValue(double[] from)
  4. maxValue(final int[] arr)
  5. maxValue(float[] arr)
  6. maxValue(int[] values)
  7. maxValueInRemainingListElements(String[] numberList, int initialIndex)
  8. maxValuePos(final float[] in)
  9. maxY(final float[] vertices)