Here you can find the source of distancia(int[] c1, int[] c2)
public static int distancia(int[] c1, int[] c2)
//package com.java2s; /* ****************************************************************************** * /*from w w w . j a v a 2 s .com*/ * This file is part of JMH * * License: * EPL: http://www.eclipse.org/legal/epl-v10.html * LGPL 3.0: http://www.gnu.org/licenses/lgpl-3.0-standalone.html * See the LICENSE file in the project's top-level directory for details. * * **************************************************************************** */ public class Main { public static int distancia(int[] c1, int[] c2) { int distancia = 0; for (int i = 0; i < c1.length; i++) { if (c1[i] != c2[i]) { distancia++; } } return distancia; } }