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