Java Array Max Value maxArray(int[] arr)

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

Description

max Array

License

Open Source License

Declaration

public static int maxArray(int[] arr) 

Method Source Code

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

public class Main {
    public static int maxArray(int[] arr) {
        int retVal = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > retVal)
                retVal = arr[i];//from  ww w .j av a2  s  .c om
        }
        return retVal;
    }
}

Related

  1. max_val_subsequence(int[] vals)
  2. maxAbs(double[] a, int begin, int end)
  3. maxAbs(float[] a, int off, int length)
  4. maxarr(double[] a)
  5. maxArray(double[] input)
  6. maxBetween(int[] arr1, int[] arr2)
  7. maxbits(int[] i, int pos, int length)
  8. maxbits32(int[] i, int pos)
  9. maxCommonLeadingWhitespaceForAll(String[] strings)