Java Array Max Value findMaxDiff(byte[] rand, byte[] newRand)

Here you can find the source of findMaxDiff(byte[] rand, byte[] newRand)

Description

find Max Diff

License

Open Source License

Declaration

public static int findMaxDiff(byte[] rand, byte[] newRand) 

Method Source Code

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

public class Main {
    public static int findMaxDiff(byte[] rand, byte[] newRand) {
        int maxDiff = 0;
        for (int i = 0; i < rand.length; i++) {
            int diff = Math.abs(rand[i] - newRand[i]);
            if (diff > maxDiff)
                maxDiff = diff;//from w  w  w. jav  a  2s.c om
        }
        return maxDiff;
    }
}

Related

  1. findMax(int[] workArray, int idx)
  2. findMax(T[] arr)
  3. findMax2(int[] workArray, int idx, int max)
  4. findMaxAbs(float[] array)
  5. findMaxCommonPrefix(String path1, String path2)
  6. findMaximumUnitFor(long elapsed, int specifiedMax)
  7. findMaxIndex(final int[] array)
  8. findMaxIndex(int[] a)
  9. findMaxIndex(int[] arr)