Java Array Max Value maxInArray(int[] src)

Here you can find the source of maxInArray(int[] src)

Description

max In Array

License

Apache License

Declaration

public static int maxInArray(int[] src) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int maxInArray(int[] src) {
        int max = src[0];
        for (int a : src) {
            if (a > max)
                max = a;/*from   ww  w .  j av  a  2s  . c  o  m*/
        }
        return max;
    }
}

Related

  1. maximum(double[] list)
  2. maximum(float[] array)
  3. maximumDouble(double... values)
  4. maximumOf(final int[] array)
  5. maxIn(double[] array)
  6. maxInArray(int[] values)
  7. maxIndAbs(double[] a)
  8. maxIndex(double values[])
  9. maxIndex(double[] a)