Arrays.equals() | Java

 

Descripción

Sintaxis

public static boolean equals(boolean[] a, boolean[] a2)
public static boolean equals(boolean[] a, int aFromIndex, int aToIndex, boolean[] b, int bFromIndex, int bToIndex)
public static boolean equals(byte[] a, byte[] a2)
public static boolean equals(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
public static boolean equals(char[] a, char[] a2)
public static boolean equals(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
public static boolean equals(double[] a, double[] a2)
public static boolean equals(double[] a, int aFromIndex, int aToIndex, double[] b, int bFromIndex, int bToIndex)
public static boolean equals(float[] a, float[] a2)
public static boolean equals(float[] a, int aFromIndex, int aToIndex, float[] b, int bFromIndex, int bToIndex)
public static boolean equals(int[] a, int[] a2)
public static boolean equals(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)
public static boolean equals(long[] a, int aFromIndex, int aToIndex, long[] b, int bFromIndex, int bToIndex)
public static boolean equals(long[] a, long[] a2)
public static boolean equals(short[] a, int aFromIndex, int aToIndex, short[] b, int bFromIndex, int bToIndex)
public static boolean equals(short[] a, short[] a2)
public static boolean equals(Object[] a, int aFromIndex, int aToIndex, Object[] b, int bFromIndex, int bToIndex)
public static boolean equals(Object[] a, Object[] a2)
static <T> boolean equals(T[] a, int aFromIndex, int aToIndex, T[] b, int bFromIndex, int bToIndex, Comparator<? super T> cmp)
static <T> boolean equals(T[] a, T[] a2, Comparator<? super T> cmp)

Parámetros

  • int[] a2,
  • char[] a,
  • float[] a2,
  • boolean[] a,
  • Object[] a,
  • double[] b,
  • int[] b,
  • byte[] a2,
  • short[] b,
  • short[] a,
  • short[] a2,
  • boolean[] a2,
  • byte[] a,
  • char[] a2,
  • Object[] b,
  • float[] a,
  • float[] b,
  • long[] a2,
  • T[] b,
  • int aToIndex,
  • T[] a,
  • long[] a,
  • int bFromIndex,
  • Comparator<? super T> cmp,
  • boolean[] b,
  • int bToIndex,
  • int[] a,
  • Object[] a2,
  • T[] a2,
  • double[] a,
  • double[] a2,
  • int aFromIndex,
  • byte[] b,
  • long[] b,
  • char[] b,

Excepciones

IllegalArgumentException, ArrayIndexOutOfBoundsException, NullPointerException

Clase Padre

Arrays

Ejemplo


Líneas de Código

    Manual Java

    Aprende más sobre Java consultando online o descargando nuestro manual.

    Test Java

    ¿Te atreves a probar tus habilidades y conocimiento en Java con nuestro test?

    Vídeos Java

    Disfruta también de nuestros artículos sobre Java en formato vídeo. Aprovecha y suscribete a nuestro canal.