The Array Class provides various Java Array Methods, or Functions for manipulating arrays. The Java Array Method performs Searching array items, sorting them etc. This Array Class also contains a static factory which allows arrays to be viewed as Lists.
Let us see the available list of Java Array Methods and its corresponding description. You can use the hyperlinks to get the detailed information of each Java Array Method, along with the practical example.
Java Array Methods
The following table will show you the list of available Array Functions in Java Array Class
Modifier and Type | Java Array Methods | Description |
---|---|---|
static int | binarySearch(byte[] x, byte key) | It search the byte array x for user specified byte value(key) using binary search algorithm. |
static int | binarySearch(byte[] x, int fromIndex, int toIndex, byte key) | This Java Array method search the range of a byte array x for user specified byte value(key) using binary search algorithm. |
static int | binarySearch(char[] x, char key) | It search the character array x for user specified character(key) using binary search algorithm. |
static int | binarySearch(char[] x, int fromIndex, int toIndex, char key) | It search the range of a character array x for user specified character(key) using binary search algorithm. |
static int | binarySearch(short[] x, short key) | This Java Array method search the short array x for user specified short value(key) using binary search algorithm. |
static int | binarySearch(short[] x, int fromIndex, int toIndex, short key) | It search the range of an short Array x for user specified short value(key) using binary search algorithm. |
static int | binarySearch(double[] x, double key) | It search the double array x for user specified double value(key) using binary search algorithm. |
static int | binarySearch(double[] x, int fromIndex, int toIndex, double key) | This Java Array method assign the user specified Doubl value (val) to each and every element present in-between the specified range of the array x |
static int | binarySearch(float[] x, float key) | It search the Float array x for user specified floating point value(key) using binary search algorithm. |
static int | binarySearch(float[] x, int fromIndex, int toIndex, float key) | It assign the Floating point value (val) to each element present in-between the specified range of the array x |
static int | binarySearch(int[] x, int key) | This Java Array method search the Integer array x for user specified Integer(key) using binary search algorithm. |
static int | binarySearch(int[] x, int fromIndex, int toIndex, int key) | It assign the user specified Integer value (val) to each and every element present in-between a specified range of the array x |
static int | binarySearch(long[] x, long key) | This Java Array Method search the Long array x for user specified long value(key) using binary search algorithm. |
static int | binarySearch(long[] x, int fromIndex, int toIndex, long key) | It assign the user specified Long value (val) to each element present between the specified range of the array x |
static int | binarySearch(Object[] x, Object key) | It search the Object array x for user specified Object(key) using binary search algorithm. |
static int | binarySearch(Object[] x, int fromIndex, int toIndex, Object key) | This Java Array function assign the user specified Object(val) to each and every element present in-between the specified range of the array x |
static boolean[] | copyOf(boolean[] x, int newLength) | It copy the Boolean Array x into New Boolean array of user specified length. |
static byte[] | copyOf(byte[] x, int newLength) | It copy the byte Array x into New byte array of given length. |
static char[] | copyOf(char[] x, int newLength) | It copy the char Array x into New char array of user specified length. |
static short[] | copyOf(short[] x, int newLength) | It copy the short Array x into New short array of user specified length. |
static double[] | copyOf(double[] x, int newLength) | Copyof Java Array Method copy the double Array x into New double array of user specified length. |
static float[] | copyOf(float[] x, int newLength) | It copy the float Array x into New float array of user specified length. |
static int[] | copyOf(int[] x, int newLength) | It copy the integer Array x into New integer array of specified length. |
static long[] | copyOf(long[] x, int newLength) | Copy the Long Array x into New Long array. |
static <T> T[] | copyOf(T[] x, int newLength) | It copy the Object Array x into New Object array of user specified length. |
static <T, U> T[] | copyOf(U[] x, int newLength, Class<? extends T[]> newType) | This Java Array Method copy the specified range of Object Array x into New array of user specified length and type. |
static boolean[] | copyOfRange(boolean[] x, int from, int to) | It copy the specified range of Boolean Array x into a New array. |
static byte[] | copyOfRange(byte[] x, int from, int to) | It copy the specified range of Byte Array x into a New array. |
static char[] | copyOfRange(char[] x, int from, int to) | It copies the Char Array x into a New array. |
static short[] | copyOfRange(short[] x,int from, int to) | It copy the specified range of Short Array x into a New array. |
static double[] | copyOfRange(double[] x, int from, int to) | It copy the specified range of Double Array x into a New array. |
static float[] | copyOfRange(float[] x, int from, int to) | It copy the float Array x into New float array of user specified length. |
static int[] | copyOfRange(int[] x, int from, int to) | It copy the specified range of integer Array x into a New array. |
static long[] | copyOfRange(long[] x,int from, int to) | It copy the specified range of Long Array x into a New array. |
static <T> T[] | copyOfRange(T[] x,int from, int to) | It copy the specified range of Object Array x into a New array. |
static <T, U> T[] | copyOfRange(U[] x, int from, int to, Class<? copyOfRange T[]> newType) | It copy the specified range of Object Array x into a New array of specified type. |
static boolean | equals(boolean[] x, boolean[] y) | It return boolean TRUE, If Boolean arrays x and y are equal to one another. |
static boolean | equals(byte[] x, byte[] y) | This Java Array Method return boolean TRUE, If Byte arrays x and y are equal to one another. |
static boolean | equals(char[] x, char[] y) | It return boolean TRUE, If Charatcers arrays x and y are equal to one another. |
static boolean | equals(short[] x, short[] y) | It return boolean TRUE, If Short arrays x and y are equal. |
static boolean | equals(double[] x, double[] y) | This Java Array Method returns boolean TRUE, If Double arrays x and y are equal to one another. |
static boolean | equals(float[] x, float[] y) | It return boolean TRUE, If Float arrays x and y are equal to one another. |
static boolean | equals(int[] x, int[] y) | If x and y arrays of Integers are equal to one another, it returns boolean TRUE |
static boolean | equals(long[] x, long[] y) | This Java Array Method return boolean TRUE, If Long arrays x and y are equal to one another. |
static boolean | equals(Object[] x, Object[] y) | It return boolean TRUE, If Object arrays x and y are equal to one another. |
static void | fill(boolean[] x, boolean val) | It assign the user specified boolean value (val) to each and every element of the array x |
static void | fill(boolean[] x, int fromIndex, int toIndex, boolean val) | It assign the user specified boolean value (val) to each and every element present in-between the specified range of the array x |
static void | fill(byte[] x, byte val) | It assign the user specified byte(val) to each and every element of the array x |
static void | fill(byte[] x, int fromIndex, int toIndex, byte val) | It assign the user specified byte value(val) to each and every element present in-between the specified range of the array x |
static void | fill(char[] x, char val) | This Java Array Method assign the user specified Character (val) to each and every element of the array x |
static void | fill(char[] x, int fromIndex, int toIndex, char val) | It assign the user specified Character (val) to each and every element present in-between the specified range of the array x |
static void | fill(short[] x, short val) | It assign the user specified short value (val) to every element of the array x |
static void | fill(short[] x, int fromIndex, int toIndex, short val) | It assign the user specified short value (val) to each element present in-between the specified range of the array x |
static void | fill(double[] x, double val) | It assign the Double value (val) to each element of the array x |
static void | fill(double[] x, int fromIndex, int toIndex, double val) | It assign Double value (val) between the specified range of the array x |
static void | fill(float[] x, float val) | It assigns Floating point value (val) to every element of the array x |
static void | fill(float[] x, int fromIndex, int toIndex, float val) | This Java Array Method assign the user specified Floating point value (val) to each and every element present in-between the specified range of the array x |
static void | fill(int[] x, int val) | It assign Integer value (val) to each element of the array x |
static void | fill(int[] x, int fromIndex, int toIndex, int val) | It assign Integer value (val) to every element present in-between the specified range of the array x |
static void | fill(long[] x, long val) | It assign Long value (val) to each element of the array x |
static void | fill(long[] x, int fromIndex, int toIndex, long val) | This Java Array Method assign the user specified Long value (val) to each and every element present in-between the specified range of the array x |
static void | fill(Object[] x, Object val) | It assign the Object(val) to all the x array element. |
static void | fill(Object[] x, int fromIndex, int toIndex, Object val) | It assign the user specified Object(val) to each and every element present in between the specified range of the array x |
static int | hashCode(boolean[] a) | This Java Array Method returns the Hashcode based on the contents of the Boolean array |
static int | hashCode(byte[] myArray) | Hash code of the Byte array |
static int | hashCode(char[] myArray) | Hash code of the character array |
static int | hashCode(short[] a) | This Java Array Method returns the Hashcode based on the contents of the specified array |
static int | hashCode(double[] myArray) | Hash code of the Double array |
static int | hashCode(float[] myArray) | Hash code of the Float array |
static int | hashCode(int[] myArray) | Hashcode of the Integer array |
static int | hashCode(long[] myArray) | This Java Array Method returns the Hashcode based on the contents of the Long array |
static int | hashCode(Object[] myArray) | Hash code of the Object array |
static void | sort(byte[] x) | It Sort the user specified Byte array into Ascending Numerical Order |
static void | sort(byte[] x, int fromIndex, int toIndex) | This Java Array Method assign the user specified byte value(val) to each and every element present in-between the specified range of the array x |
static void | sort(char[] x) | It Sort the user specified Character array into Ascending Numerical Order |
static void | sort(char[] x, int fromIndex, int toIndex) | It assign the user specified Character (val) to each element present in-between the specified range of the array x |
static void | sort(short[] x) | This Java Array Method Sort the user specified short array into Ascending Numerical Order |
static void | sort(short[] x, int fromIndex, int toIndex) | It assigns the user given short value (val) to each and every element present in-between the specified range of the array x |
static void | sort(double[] x) | It Sort the user specified Double array into Ascending Numerical Order |
static void | sort(double[] x, int fromIndex, int toIndex) | It assigns the user specified Double value (val) to every element present in-between the specified range of the array x |
static void | sort(float[] x, float val) | This Java Array Method assign the Floating point value (val) to each element of the array x |
static void | sort(float[] x, int fromIndex, int toIndex, float val) | It assigns Floating point value (val) to every element present in-between the specified range of the array x |
static void | sort(int[] x, int val) | It assigns the user specified Integer value (val) to each element of the array x |
static void | sort(int[] x, int fromIndex, int toIndex, int val) | This Java Array Method assign the user specified Integer value (val) to each and every element present in-between the specified range of the array x |
static void | sort(long[] x, long val) | It assigns the user-specified Long value (val) to every element of the array x |
static void | sort(long[] x, int fromIndex, int toIndex, long val) | It assigns the Long value to each element between the specified range. |
static void | sort(Object[] x, Object val) | It assign the user specified Object(val) to each and every element of the array x |
static void | sort(Object[] x, int fromIndex, int toIndex, Object val) | This Java Array Method assign the user specified Object(val) to each and every element present in-between the specified range of the array x |
static String | toString(boolean[] a) | String representation of the Boolean array |
static String | toString(byte[] myByteArray) | Byte array to string |
static String | toString(char[] myArray) | Character array to string |
static String | toString(short[] a) | Returns a string representationof the contents of the specified array |
static String | toString(double[] myArray) | This Java Array method returns a string representation of the contents of the Double array |
static String | toString(float[] myArray) | Float array to String |
static String | toString(int[] myArray) | Integer array to String |
static String | toString(long[] myArray) | Long array to String |
static String | toString(Object[] myArray) | This Java Array method returns a string representation of the contents of the Object array |