Descripción
Sintaxis
public static int binarySearch(byte[] a, byte key)
public static int binarySearch(byte[] a, int fromIndex, int toIndex, byte key)
public static int binarySearch(char[] a, char key)
public static int binarySearch(char[] a, int fromIndex, int toIndex, char key)
public static int binarySearch(double[] a, double key)
public static int binarySearch(double[] a, int fromIndex, int toIndex, double key)
public static int binarySearch(float[] a, float key)
public static int binarySearch(float[] a, int fromIndex, int toIndex, float key)
public static int binarySearch(int[] a, int key)
public static int binarySearch(int[] a, int fromIndex, int toIndex, int key)
public static int binarySearch(long[] a, int fromIndex, int toIndex, long key)
public static int binarySearch(long[] a, long key)
public static int binarySearch(short[] a, int fromIndex, int toIndex, short key)
public static int binarySearch(short[] a, short key)
public static int binarySearch(Object[] a, int fromIndex, int toIndex, Object key)
public static int binarySearch(Object[] a, Object key)
static <T> int binarySearch(T[] a, int fromIndex, int toIndex, T key, Comparator<? super T> c)
static <T> int binarySearch(T[] a, T key, Comparator<? super T> c)
Parámetros
- char[] a,
- short key,
- T key,
- Object[] a,
- short[] a,
- Object key,
- double key,
- byte[] a,
- int toIndex,
- long key,
- float key,
- float[] a,
- T[] a,
- long[] a,
- Comparator<? super T> c,
- byte key,
- int[] a,
- int key,
- char key,
- double[] a,
- int fromIndex,
Excepciones
IllegalArgumentException, ClassCastException, ArrayIndexOutOfBoundsException
Clase Padre
Ejemplo
Líneas de Código
Vídeos Java
Disfruta también de nuestros artículos sobre Java en formato vídeo. Aprovecha y suscribete a nuestro canal.