Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/05/2013, 13:18
Avatar de alguienmas
alguienmas
 
Fecha de Ingreso: mayo-2009
Mensajes: 62
Antigüedad: 15 años
Puntos: 8
Respuesta: Todos los elementos de un vector distintos

Código:
public boolean todosDistintos(int [] m)
{
      for(int i=0; i < m.length; i++)
      {
            for(j=i+1; i < m.length; j++)
            {
                   if(m[i] == m[j])
                        return false;
             }
       }
       return true;
}
Saludos.