Java Array Difference difference2D(char[][] first, char[][] second)

Here you can find the source of difference2D(char[][] first, char[][] second)

Description

difference D

License

Open Source License

Declaration

public static int difference2D(char[][] first, char[][] second) 

Method Source Code

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

public class Main {
    public static int difference2D(char[][] first, char[][] second) {
        int result = 0;
        for (int i = 0; i < first.length; i++) {
            for (int j = 0; j < first[0].length; j++) {
                if (first[i][j] != second[i][j]) {
                    result++;/*from  w  ww .  j a  va2s .c om*/
                }
            }
        }
        return result;
    }
}

Related

  1. difference(float[] v1, float[] v2)
  2. difference5D(char[][][][][] first, char[][][][][] second)
  3. differenceFunction(float[] data, int windowLength)