{"id":118144,"date":"2020-04-06T10:52:41","date_gmt":"2020-04-06T10:52:41","guid":{"rendered":"https:\/\/www.softwaretestinghelp.com\/?page_id=118144"},"modified":"2025-04-01T08:29:36","modified_gmt":"2025-04-01T08:29:36","slug":"java-array-class-tutorial","status":"publish","type":"page","link":"https:\/\/www.softwaretestinghelp.com\/java-array-class-tutorial\/","title":{"rendered":"Java Array Class Tutorial &#8211; java.util.Arrays Class with Examples"},"content":{"rendered":"<p><strong>This Tutorial Covers the Array Class in Java and the methods of java.util.arrays Class along with Detailed Description &amp; Examples of Array Class methods:<\/strong><\/p>\n<p>The \u2018Arrays\u2019 class is a member of the \u2018java.util\u2019 package. This is a part of the Java Collections framework and provides methods to create, access and manipulate Java arrays dynamically.<\/p>\n<p>All the methods provided by the Arrays class are static in nature and are methods of the \u2018Object\u2019 class. As the methods are static, they can be accessed using the class name itself.<\/p>\n<p><strong>=&gt; <a href=\"https:\/\/www.softwaretestinghelp.com\/java\/\">Check ALL Java Tutorials Here.<\/a><\/strong><\/p>\n<p><em><strong> <\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Java-_Arrays_-Class.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118377\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Java-_Arrays_-Class.png\" alt=\"Java _Arrays_ Class\" width=\"650\" height=\"366\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Java-_Arrays_-Class.png 650w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Java-_Arrays_-Class-300x169.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<h2>Java Array Class<\/h2>\n<p>The Arrays class was introduced in Java 1.2 and the methods it contains are mostly used for manipulation of the array including searching, sorting, etc. The arrays class provides overloaded methods for almost all the data types.<\/p>\n<p><strong>The class hierarchy for Arrays class is shown below:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/03\/class-hierarchy-for-Arrays.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-124219\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/03\/class-hierarchy-for-Arrays.png\" alt=\"class hierarchy for Arrays\" width=\"230\" height=\"179\" \/><\/a><\/p>\n<p>The Arrays class extends from Object class and its methods are methods of Object class.<\/p>\n<p><strong>The general syntax to access any method of Arrays class is:<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">Arrays.&amp;lt;method_name&amp;gt;;<\/pre>\n<p>In the upcoming section, we will list out the various methods provided by the Arrays class.<\/p>\n<h2>Java Arrays Methods<\/h2>\n<p>The following tables give an introduction to the various methods provided by the Arrays class. Here we have listed the main methods. Note that most of the methods are overloaded to provide support for all the primitive types.<\/p>\n<p>We will list the prototype and description of each of the functions. Then in the following section, we will describe some of the important methods by providing programming examples.<\/p>\n\n<div id=\"tablepress-1156-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1156\" class=\"tablepress tablepress-id-1156 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\"><strong>asList<\/strong><\/td><td class=\"column-2\">static< T> List< <br \/>\nT>asList(Object[]\u00a0a)<\/td><td class=\"column-3\">Returns a list(fixed-size) from specified array<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td rowspan=\"18\" class=\"column-1\"><strong>binarySearch<\/strong><br \/>\nThis method uses the binary search algorithm.<br \/>\nShown in the next column are various overloads of the binarySearch method.<\/td><td class=\"column-2\">static int binarySearch(byte[] a, byte key)<\/td><td class=\"column-3\">Searches for a key in a byte array <\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-2\">static int binarySearch(byte[] a, int fromIndex, int toIndex, byte key)<\/td><td class=\"column-3\">Searches the key across the specified range in a byte array<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-2\">static int binarySearch(char[] a, char key)<\/td><td class=\"column-3\">Searches a key in a character array<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static int binarySearch(char[] a, int fromIndex, int toIndex, char key)<\/td><td class=\"column-3\">Searches the key across the specified range in a character array<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static int binarySearch(double[] a, double key)<\/td><td class=\"column-3\">Searches a key in a double array<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static int binarySearch(double[] a, int fromIndex, int toIndex, double key)<\/td><td class=\"column-3\">Searches the key across the specified range in a double array<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static int binarySearch(float[] a, float key)<\/td><td class=\"column-3\">Searches a key in an array of floats<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static int binarySearch(float[] a, int fromIndex, int toIndex, float key)<\/td><td class=\"column-3\">Searches the key across the specified range in a floats array<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-2\">static int binarySearch(int[] a, int key)<\/td><td class=\"column-3\">Searches a key in an int array<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-2\">static int binarySearch(int[] a, int fromIndex, int toIndex, int key)<\/td><td class=\"column-3\">Searches the key across the specified range in an int array<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-2\">static int binarySearch(long[] a, long key)<\/td><td class=\"column-3\">Searches a key in long array<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-2\">static int binarySearch(long[] a, int fromIndex, int toIndex, long key)<\/td><td class=\"column-3\">Searches the key across the specified range in long array<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-2\">static int binarySearch(Object[] a, Object key)<\/td><td class=\"column-3\">Searches a key in an object array<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-2\">static int binarySearch(Object[] a, int fromIndex, int toIndex, Object key)<\/td><td class=\"column-3\">Searches the key across the specified range in the object array<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-2\">static int binarySearch(short[] a, short key)<\/td><td class=\"column-3\">Searches a key in an array of shorts<\/td>\n<\/tr>\n<tr class=\"row-18\">\n\t<td class=\"column-2\">static int binarySearch(short[] a, int fromIndex, int toIndex, short key)<\/td><td class=\"column-3\">Searches the key across the specified range in an array of shorts<\/td>\n<\/tr>\n<tr class=\"row-19\">\n\t<td class=\"column-2\">static < T> int binarySearch(T[] a, T key, Comparator< ? super T> c)<\/td><td class=\"column-3\">Searches a key in an array of specified objects<\/td>\n<\/tr>\n<tr class=\"row-20\">\n\t<td class=\"column-2\">static < T> int binarySearch(T[] a, int fromIndex, int toIndex, T key, Comparator< ? super T> c)<\/td><td class=\"column-3\">Searches the key across the specified range in array of objects<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1156 from cache -->\n\n<div id=\"tablepress-1157-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1157\" class=\"tablepress tablepress-id-1157 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td rowspan=\"10\" class=\"column-1\">copyOf<br \/>\n<br \/>\nThe method is used to copy the array with the specified length.<br \/>\n<br \/>\nNext column lists the overloads of this method<\/td><td class=\"column-2\">static boolean[]copyOf(boolean[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends values \u2018false\u2019 if necessary<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-2\">static byte[]copyOf(byte[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends zeros if necessary<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-2\">static char[]copyOf(char[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends null if necessary<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-2\">static double[] copyOf(double[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends zeros if necessary<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static float[]copyOf(float[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends zeros if necessary<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static int[]copyOf(int[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends zeros if necessary<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static long[]copyOf(long[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends zeros if necessary<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static short[]copyOf(short[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends zeros if necessary<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static < T> T[] copyOf(T[] original, int newLength)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends nulls if necessary<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-2\">static <T,U> T[]copyOf(U[] original, int newLength, Class< ? extends T[]>newType)<\/td><td class=\"column-3\">Copies the specified array. Truncates or appends nulls if necessary<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td rowspan=\"10\" class=\"column-1\">copyOfRange<br \/>\n<br \/>\nThis method is used to copy a specified range in the array.<br \/>\n<br \/>\nThe overloads for this method are given in the next column<\/td><td class=\"column-2\">static boolean[]copyOfRange(boolean[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-2\">static byte[]copyOfRange(byte[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-2\">static char[]copyOfRange(char[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-2\">static double[] copyOfRange(double[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-2\">static float[]copyOfRange(float[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-2\">static int[]copyOfRange(int[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-18\">\n\t<td class=\"column-2\">static long[]copyOfRange(long[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-19\">\n\t<td class=\"column-2\">static short[]copyOfRange(short[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-20\">\n\t<td class=\"column-2\">static < T> T[] copyOfRange(T[] original, int from, int to)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<tr class=\"row-21\">\n\t<td class=\"column-2\">static < T,U> T[] copyOfRange(U[] original, int from, int to, Class< ? extends T[]>newType)<\/td><td class=\"column-3\">Copies the array with specified range into a new array<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1157 from cache -->\n\n<div id=\"tablepress-1158-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1158\" class=\"tablepress tablepress-id-1158 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\"><strong>deepEquals<\/strong><\/td><td class=\"column-2\">static boolean deepEquals(Object[] a1, Object[] a2)<\/td><td class=\"column-3\">Checks if two specified arrays are deeply equal<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\"><strong>deepHashCode<\/strong><\/td><td class=\"column-2\">static intdeepHashCode(Object[] a)<\/td><td class=\"column-3\">Returns a hash code of the specified array<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\"><strong>deepToString<\/strong><\/td><td class=\"column-2\">static StringdeepToString(Object[] a)<\/td><td class=\"column-3\">Returns the \"deep contents\" of the specified array in a string<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td rowspan=\"9\" class=\"column-1\"><strong>Equals<\/strong><br \/>\n<br \/>\nChecks if two specified arrays are equal<\/td><td class=\"column-2\">static boolean equals(boolean[] a, boolean[] a2)<\/td><td class=\"column-3\">Returns true if the two specified booleanarrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static boolean equals(byte[] a, byte[] a2)<\/td><td class=\"column-3\">Returns true if the two specified byte arrays are equal<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static boolean equals(char[] a, char[] a2)<\/td><td class=\"column-3\">Returns true if the two specified character arrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static boolean equals(double[] a, double[] a2)<\/td><td class=\"column-3\">Returns true if the two specified double arrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static boolean equals(float[] a, float[] a2)<\/td><td class=\"column-3\">Returns true if the two specified float arrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static boolean equals(int[] a, int[] a2)<\/td><td class=\"column-3\">Returns true if the two specified int arrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-2\">static boolean equals(long[] a, long[] a2)<\/td><td class=\"column-3\">Returns true if the two specified long arrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-2\">static boolean equals(Object[] a, Object[] a2)<\/td><td class=\"column-3\">Returns true if the two specified Object arrays are equal.<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-2\">static boolean equals(short[] a, short[] a2)<\/td><td class=\"column-3\">Returns true if the two specified short arrays are equal.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1158 from cache -->\n\n<div id=\"tablepress-1159-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1159\" class=\"tablepress tablepress-id-1159 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td rowspan=\"18\" class=\"column-1\"><strong>fill<\/strong><br \/>\n<br \/>\nFills the array(all elements) with the specified value.<br \/>\n<br \/>\nNext column gives the overloads for this function<\/td><td class=\"column-2\">static void fill(boolean[] a, boolean val)<\/td><td class=\"column-3\">Fills the boolean array with a specified boolean value<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-2\">static void fill(boolean[] a, int fromIndex, int toIndex, boolean val)<\/td><td class=\"column-3\">Assigns a boolean value to the specified range in the boolean array.<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-2\">static void fill(byte[] a, byte val)<\/td><td class=\"column-3\">Fills the byte array with a specified byte value<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-2\">static void fill(byte[] a, int fromIndex, int toIndex, byte val)<\/td><td class=\"column-3\">Fills the byte array with specified byte value in the given range<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static void fill(char[] a, char val)<\/td><td class=\"column-3\">Fills the char array with specified char value<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static void fill(char[] a, int fromIndex, int toIndex, char val)<\/td><td class=\"column-3\">Fills the char array range with specified char value<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static void fill(double[] a, double val)<\/td><td class=\"column-3\">Fills the double array with specified double value<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static void fill(double[] a, int fromIndex, int toIndex, double val)<\/td><td class=\"column-3\">Assigns a double value to the specified range in the double array.<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static void fill(float[] a, float val)<\/td><td class=\"column-3\">Assigns float value to the specified range in the float array.<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-2\">static void fill(float[] a, int fromIndex, int toIndex, float val)<\/td><td class=\"column-3\">Assigns float value to the specified range in the float array.<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-2\">static void fill(int[] a, int val)<\/td><td class=\"column-3\">Assigns int value to the int array.<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-2\">static void fill(int[] a, int fromIndex, int toIndex, int val)<\/td><td class=\"column-3\">Assigns int value to the specified range in the int array.<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-2\">static void fill(long[] a, int fromIndex, int toIndex, long val)<\/td><td class=\"column-3\">Assigns a long value to the specified range in the long array.<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-2\">static void fill(long[] a, long val)<\/td><td class=\"column-3\">Assigns a long value to the long array.<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-2\">static void fill(Object[] a, int fromIndex, int toIndex, Object val)<\/td><td class=\"column-3\">Assigns Object reference to specified range in the Object array.<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-2\">static void fill(Object[] a, Object val)<\/td><td class=\"column-3\">Assigns Object reference to the specified objectarray<\/td>\n<\/tr>\n<tr class=\"row-18\">\n\t<td class=\"column-2\">static void fill(short[] a, int fromIndex, int toIndex, short val)<\/td><td class=\"column-3\">Assigns a short value to the specified range in the short array.<\/td>\n<\/tr>\n<tr class=\"row-19\">\n\t<td class=\"column-2\">static void fill(short[] a, short val)<\/td><td class=\"column-3\">Assigns a short value to the specified short array.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1159 from cache -->\n\n<div id=\"tablepress-1160-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1160\" class=\"tablepress tablepress-id-1160 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td rowspan=\"18\" class=\"column-1\"><strong>Sort<\/strong><br \/>\nSorts the array passed as a parameter to the method.<br \/>\nOverloads are given in the next column.<br \/>\n<\/td><td class=\"column-2\">static void sort(byte[] a)<\/td><td class=\"column-3\">Sorts the byte array numerically<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-2\">static void sort(byte[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the range of elements from the array<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-2\">static void sort(char[] a)<\/td><td class=\"column-3\">Sorts the character array into ascending numerical order.<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-2\">static void sort(char[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the range of elements in the array into ascending order.<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static void sort(double[] a)<\/td><td class=\"column-3\">Sorts the double array into ascending numerical order.<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static void sort(double[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the range of elements from the array into ascending order.<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static void sort(float[] a)<\/td><td class=\"column-3\">Sorts the float array into ascending numerical order.<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static void sort(float[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the range of elements from the array into ascending order.<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static void sort(int[] a)<\/td><td class=\"column-3\">Sorts the int array into ascending numerical order.<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-2\">static void sort(int[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts therange of elements from the array into ascending order.<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-2\">static void sort(long[] a)<\/td><td class=\"column-3\">Sorts the long array into ascending numerical order.<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-2\">static void sort(long[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the range of elements from the array into ascending order<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-2\">static void sort(Object[] a)<\/td><td class=\"column-3\">Sorts the array of objects into ascending order. Sorting is done according to the natural ordering of its elements<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-2\">static void sort(Object[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the specified range froman array of objects into ascending order. Sorting is done according to the natural ordering of its elements.<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-2\">static void sort(short[] a)<\/td><td class=\"column-3\">Sorts the array of type short into ascending numerical order.<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-2\">static void sort(short[] a, int fromIndex, int toIndex)<\/td><td class=\"column-3\">Sorts the range of elements from the array into ascending order.<\/td>\n<\/tr>\n<tr class=\"row-18\">\n\t<td class=\"column-2\">static < T> void sort(T[] a, Comparator< ? super T> c)<\/td><td class=\"column-3\">Sorts the specified array of objects. The order of sorting is induced as per the specified comparator.<\/td>\n<\/tr>\n<tr class=\"row-19\">\n\t<td class=\"column-2\">static < T> void sort(T[] a, int fromIndex, int toIndex, Comparator< ? super T> c)<\/td><td class=\"column-3\">Sorts the range of elementsfrom an array of objects in the order specified by the comparator.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1160 from cache -->\n\n<div id=\"tablepress-1161-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1161\" class=\"tablepress tablepress-id-1161 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td rowspan=\"9\" class=\"column-1\"><strong>toString<\/strong><br \/>\n<br \/>\nThis method returns the string representation of a given array.<br \/>\nDifferent overloads of this method are given in the next column<\/td><td class=\"column-2\">static String toString(boolean[] a)<\/td><td class=\"column-3\">Returns a string representation of a boolean array<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-2\">static String toString(byte[] a)<\/td><td class=\"column-3\">Returns a string representation of a byte array<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-2\">static String toString(char[] a)<\/td><td class=\"column-3\">Returns a string representation of a character array<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-2\">static String toString(double[] a)<\/td><td class=\"column-3\">Returns a string representation of a double array<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static String toString(float[] a)<\/td><td class=\"column-3\">Returns a string representation of a float array<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static String toString(int[] a)<\/td><td class=\"column-3\">Returns a string representation of an int array<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static String toString(long[] a)<\/td><td class=\"column-3\">Returns a string representation of a long array<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static String toString(Object[] a)<\/td><td class=\"column-3\">Returns a string representation of an object array<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static String toString(short[] a)<\/td><td class=\"column-3\">Returns a string representation of a short array<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1161 from cache -->\n\n<div id=\"tablepress-1162-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-1162\" class=\"tablepress tablepress-id-1162 tablepress-responsive tbody-has-connected-cells\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\"><strong>Method Name<\/strong><\/th><th class=\"column-2\"><strong>Prototype<\/strong><\/th><th class=\"column-3\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td rowspan=\"9\" class=\"column-1\"><strong>hashCode<\/strong><br \/>\nThis method returns the hashCode of the contents of the specified array<br \/>\nThe overloaded methods are given in the next column.<br \/>\n<\/td><td class=\"column-2\">static int hashCode(boolean[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of the boolean array<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-2\">static int hashCode(byte[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of the byte array<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-2\">static int hashCode(char[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of the character array<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-2\">static int hashCode(double[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of a double array<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-2\">static int hashCode(float[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of a float array<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-2\">static int hashCode(int[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of an int array.<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-2\">static int hashCode(long[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of a long array<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-2\">static int hashCode(Object[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of object array<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-2\">static int hashCode(short[] a)<\/td><td class=\"column-3\">Returns hash code of the contents of the short array<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-1162 from cache -->\n<p>The above tables shows all the methods the Arrays class provides. Most of these are overloaded for various primitive types.<\/p>\n<p>Let&#8217;s discuss some of these methods in detail.<\/p>\n<h3><span style=\"color: #ff6600;\">#1) asList<\/span><\/h3>\n<p><strong>Prototype: <\/strong>static &lt;T&gt; List&lt;T&gt; asList (Object[] a)<br \/>\n<strong>Parameters: <\/strong>a &#8211; array of objects from which the list will be backed.<br \/>\n<strong>Return Value: <\/strong>List&lt;T&gt; =&gt; fixed-size list of specified array<\/p>\n<p><strong>Description:<\/strong> Returns a fixed-size serializable list backed by an array provided as an argument.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\n\r\npublic class Main {\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\tString&#x5B;] months = {&quot;January&quot;, &quot;February&quot;, &quot;March&quot;, &quot;April&quot;, &quot;May&quot;};\r\n\t\t\/\/ converted string array to a List using asList\r\n\t\tSystem.out.println(&quot;The string array converted to list:&quot;);\t\r\n\t\tList&amp;lt;String&amp;gt; month_list = Arrays.asList(months);\r\n\t\tSystem.out.println(month_list);\r\n\t}\r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/asList.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118351\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/asList.png\" alt=\"asList\" width=\"405\" height=\"65\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/asList.png 405w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/asList-300x48.png 300w\" sizes=\"(max-width: 405px) 100vw, 405px\" \/><\/a><\/p>\n<p>The above program demonstrates the usage of the \u2018asList\u2019 method of Arrays class. Here, we have declared a string array and passed it to asList method to obtain a list.<\/p>\n<h3><span style=\"color: #ff6600;\">#2) binarySearch<\/span><\/h3>\n<p><strong>Prototype: <\/strong>static int binarySearch (int[] a, int key)<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>a =&gt; array in which the key is to be searched<br \/>\nKey=&gt; element value to be searched<\/p>\n<p><strong>Return Value: <\/strong>int=&gt;position (index) at which key is found, else returns (-(the &#8220;insertion point&#8221;) &#8211; 1).<\/p>\n<p><strong>Description: <\/strong>Searches for the specified key in the given array using a binary search algorithm. The array needs to be sorted for the binary search to work. If the array is not sorted then the results are undefined. Also, if there are multiple locations in the array for the same key value, the position returned is not guaranteed.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\n\r\npublic class Main { \r\n    public static void main(String&#x5B;] args) \r\n    { \r\n        \/\/ define the Array \r\n        int numArr&#x5B;] = { 23,43,26,65,35,16,74,27,98 }; \r\n        \/\/sort the array first\r\n        Arrays.sort(numArr); \r\n        System.out.println(&quot;Input array:&quot; + Arrays.toString(numArr));\r\n\r\n         int key = 35; \r\n        \/\/call binarySearch function to search a given key\r\n         System.out.println(&quot;Key &quot; + key + &quot; found at index = &quot; + Arrays \r\n                                 .binarySearch(numArr, key)); \r\n    } \r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/binarySearch.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118352\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/binarySearch.png\" alt=\"binarySearch\" width=\"478\" height=\"56\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/binarySearch.png 478w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/binarySearch-300x35.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p>In the above program first, we sort the input array since for binarySearch the array should be sorted. Then the array and the key to be searched are passed to the \u2018binarySearch\u2019 method. The index at which the key is found is displayed in the output.<\/p>\n<p><strong>Prototype: <\/strong>static int binarySearch (int[] a, int fromIndex, int toIndex, int key)<\/p>\n<p><strong>Parameters: <\/strong><\/p>\n<p>a=&gt; array to be searched<br \/>\nfromIndex=&gt; starting index of the range over which the key is to be searched<br \/>\ntoIndex=&gt; the index of the last element in the range<br \/>\nkey=&gt; key to be searched for<\/p>\n<p><strong>Return Value: <\/strong>index of the key element is found in the specified range. Otherwise it returns (-(the &#8220;insertion point&#8221;) &#8211; 1).<\/p>\n<p><strong>Description: <\/strong>This overload of binarySearch searches for a key value in the specified range of the array and returns the index position of the key element if found. The array and therefore the range need to be sorted for binarySearch to work. If it\u2019s not sorted, then the results are undefined.<\/p>\n<p><span style=\"color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\n\r\npublic class Main {\r\n    public static void main(String&#x5B;] args)\r\n    {\r\n      int numArr&#x5B;] = { 23,43,26,65,35,16,74,27,98 }; \/\/ define the Array\r\n      Arrays.sort(numArr); \/\/sort the array first\r\n      System.out.println(&quot;Input array:&quot; + Arrays.toString(numArr));\r\n      int key = 35;\r\n      \/\/call binarySearch function to search a given key\r\n      System.out.println(&quot;Key &quot; + key + &quot; found at index = &quot; + Arrays\r\n                 .binarySearch(numArr,3,7, key));\r\n     }\r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Returns-the-index-position-of-the-key-element.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118353\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Returns-the-index-position-of-the-key-element.png\" alt=\"Returns the index position of the key element\" width=\"419\" height=\"53\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Returns-the-index-position-of-the-key-element.png 419w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Returns-the-index-position-of-the-key-element-300x38.png 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/a><\/p>\n<p>The above program is the same as the previous one with a difference that in the call to binarySearch method, we have specified a range of the array in which the search is to be conducted.<\/p>\n<h3><span style=\"color: #ff6600;\">#3) copyOf<\/span><\/h3>\n<p><strong>Prototype: <\/strong>static int[] copyOf(int[] original, int newLength)<\/p>\n<p><strong>Parameters: <\/strong><\/p>\n<p>original=&gt; array to be copied<br \/>\nnewLength=&gt; length of the copied array<\/p>\n<p><strong>Return Value: <\/strong>A new array copied from the original and padded or truncated with zeros depending on a specified length.<\/p>\n<p><strong>Description: <\/strong>Copies the array original into a new array and pads or truncates it with zeros depending on the length specified.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main { \r\n    public static void main(String&#x5B;] args) \r\n    { \r\n\r\n        \/\/ define the Array \r\n        String strArr&#x5B;] = {&quot;Java&quot;, &quot;Python&quot;, &quot;Perl&quot;, &quot;C&quot;, &quot;Ruby&quot;}; \r\n\r\n        \/\/ print the original array \r\n       System.out.println(&quot;Original String Array: &quot;\r\n                           + Arrays.toString(strArr)); \r\n        \/\/copy the array into new array using copyOf and print it\r\n        System.out.println(&quot;Copied Array: &quot;\r\n                           + Arrays.toString(\r\n                      Arrays.copyOf(strArr, 5))); \r\n    } \r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOf.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118354\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOf.png\" alt=\"copyOf\" width=\"459\" height=\"54\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOf.png 459w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOf-300x35.png 300w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/a><\/p>\n<p>The above program demonstrates the use of the \u2018copyOf\u2019 method of Arrays class that copies the given array into a new one. The above program copies the original string array into a new array.<\/p>\n<h3><span style=\"color: #ff6600;\">#4) copyOfRange<\/span><\/h3>\n<p><strong>Prototype: <\/strong>static int[] copyOfRange(int[] original, int from, int to)<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>original =&gt; array from which values in the range are to be copied<br \/>\nFrom=&gt; first index of the range<br \/>\nTo=&gt; last index of the range<\/p>\n<p><strong>Return Value:<\/strong> New array with values from the specified range with zeros truncated or padded to obtain the desired length.<\/p>\n<p><strong>Description: <\/strong>Copies the range specified from a given array into a new array. The started index of the array should be inclusive between 0 to original.length. The end index can be exclusive.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main { \r\npublic static void main(String&#x5B;] args) \r\n    { \r\n         \/\/ define the Array \r\n        String strArr&#x5B;] = {&quot;Java&quot;, &quot;Python&quot;, &quot;Perl&quot;, &quot;C&quot;, &quot;Ruby&quot;}; \r\n\r\n        \/\/ print the original array \r\n       System.out.println(&quot;Original String Array: &quot;  + Arrays.toString(strArr)); \r\n        \/\/copy the array into new array using copyOfRange and print it\r\n       System.out.println(&quot;Copied Range of Array: &quot;\r\n                  + Arrays.toString(\r\n                         Arrays.copyOfRange(strArr,1,3))); \r\n    } \r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOfRange.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118355\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOfRange.png\" alt=\"copyOfRange\" width=\"454\" height=\"56\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOfRange.png 454w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/copyOfRange-300x37.png 300w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/a><\/p>\n<p>We have modified the previous program to use the \u2018copyOfRange\u2019 method that copies a specific range from the array and forms a new array. In the above program, we have specified the range like 1, 3. Hence the output shows a new array of 2 elements.<\/p>\n<h3><span style=\"color: #ff6600;\">#5) Equals<\/span><\/h3>\n<p><strong>Prototype: <\/strong>static boolean equals (int [] a, int [] a2)<\/p>\n<p><strong>Parameters: <\/strong><\/p>\n<p>a<strong><em>=&gt; <\/em><\/strong>first array to be tested for equality<br \/>\nA2=&gt; second array to be tested for equality<\/p>\n<p><strong>Return Value: <\/strong>Returns true if both arrays are equal.<\/p>\n<p><strong>Description: <\/strong>This method checks if both the arrays are equal and return the results. The two arrays are said to be equal if both the arrays have an equal number of elements and the corresponding elements in both arrays are equal.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main {\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\/\/ define two arrays, array_One and array_Two\r\n\t\tint&#x5B;] array_One = { 1, 3, 5, 7 };\r\n\t\tint&#x5B;] array_Two = { 1, 3, 5, 7 };\r\n\t\t\/\/print the arrays\r\n\t\tSystem.out.println(&quot;array_One = &quot; + Arrays.toString(array_One));\r\n\t\tSystem.out.println(&quot;array_Two = &quot; + Arrays.toString(array_Two));\r\n\t\t\/\/use equals method to check for equality of arrays\t\t\r\n\t\tbooleanarray_equal = Arrays.equals(array_One, array_Two);\r\n\t\t\/\/print the results\r\n\t\tif (array_equal) {\r\n\t\t\tSystem.out.println(&quot;equals method returns &quot; + array_equal + \r\n\t\t\t&quot;, hence arrays array_One and array_Two are equal\\n&quot;);\t\r\n\t\t}else {\r\n\t\t\tSystem.out.println(&quot;equals method returns &quot; + array_equal + \r\n\t\t\t&quot;, hence arrays array_One and array_Two are not equal\\n&quot;);\r\n\t\t}\r\n\t\t\/\/ define two more arrays, firstArray&amp;amp;secondArray\r\n\t\tint&#x5B;] firstArray = { 2, 4, 6, 8 };\r\n\t\tint&#x5B;] secondArray = { 1, 3, 5, 7};\r\n\t\t \/\/display these arrays\r\n\t\tSystem.out.println(&quot;firstArray = &quot; + Arrays.toString(firstArray));\r\n\t\tSystem.out.println(&quot;secondArray = &quot; + Arrays.toString(secondArray));\r\n\t\t\/\/use equals method to check equality of arrays\t\t\r\n\t\tboolean test_array = Arrays.equals(firstArray, secondArray);\r\n\t\t\r\n\t\t\/\/print the results\r\n\t\tif (test_array) {\r\n\t\t\tSystem.out.println(&quot;equals method returns &quot; + test_array + \r\n\t\t\t&quot;, hence arrays firstArray and secondArray are equal\\n&quot;);\t\r\n\r\n\t\t}else {\r\n\t\t\tSystem.out.println(&quot;equals method returns &quot; + test_array + \r\n\t\t\t&quot;, hence arrays firstArray and secondArray are not equal\\n&quot;);\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Equals.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118357\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Equals.png\" alt=\"Equals\" width=\"645\" height=\"228\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Equals.png 645w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Equals-300x106.png 300w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<p>The above program demonstrates the \u2018equals\u2019 method. Here, we have used two sets of arrays and called \u2018equals\u2019 twice. In the first call to equals, both arrays are the same and hence the method returns true. In the second call to equals, the two arrays are different and the method returns false.<\/p>\n<h3><span style=\"color: #ff6600;\">#6) Fill<\/span><\/h3>\n<p><strong>Prototype:<\/strong> static void fill(int[] a, int val)<\/p>\n<p><strong>Parameters: <\/strong><\/p>\n<p>a=&gt; array to be filled<br \/>\nval=&gt; value to be filled in all places in array<\/p>\n<p><strong>Return Value: <\/strong>None<br \/>\n<strong>Description: <\/strong>Fills the array with the specified value.<\/p>\n<p><span style=\"color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main {\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\/\/ define the array\r\n\t\tint&#x5B;] intArray = { 1, 3, 5, 7 };\r\n\t\t\/\/print original array\r\n\t\tSystem.out.println(&quot;The original array: &quot; + Arrays.toString(intArray));\r\n\t\t\/\/call fill method to fill the array with all zeros\t\t\r\n\t\tArrays.fill(intArray, 0);\r\n\t\t\/\/print altered array\r\n\t\tSystem.out.println(&quot;Array after call to fill:&quot; + Arrays.toString(intArray));\r\n\t}\t\t\r\n}\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fill.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118359\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fill.png\" alt=\"Fill\" width=\"358\" height=\"69\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fill.png 358w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fill-300x58.png 300w\" sizes=\"(max-width: 358px) 100vw, 358px\" \/><\/a><\/p>\n<p>The above program shows the basic version of the fill method. Here, we just fill the entire array by another value. In this case, we have filled the array with all zeros.<\/p>\n<p><strong>Prototype: <\/strong>static void fill(int[] a, int fromIndex, int toIndex, int val)<\/p>\n<p><strong>Parameters: <\/strong><\/p>\n<p>a=&gt; array whose range is to be filled<br \/>\nfromIndex =&gt; start index of the range<br \/>\ntoIndex =&gt; end index of the range<br \/>\nval=&gt; value with which the elements in the range is to be filled<\/p>\n<p><strong>Return Value: <\/strong>None<\/p>\n<p><strong>Description: <\/strong>Fills the specified range from fromIndex to toIndex in the array \u2018a\u2019 with the specified value. If fromIndex = toIndex, then the range to be filled is empty.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main {\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\/\/ define the array\r\n\t\tint&#x5B;] intArray = { 1, 3, 5, 7, 9, 11, 13, 15,17};\r\n\t\t\/\/print original array\r\n\t\tSystem.out.println(&quot;The original array: &quot; + Arrays.toString(intArray));\r\n\t\t\/\/call fill method to fill the range (2,6) in the array with zeros\t\t\r\n\t\tArrays.fill(intArray, 2, 6, 0);\r\n\t\t\/\/print altered array\r\n\t\tSystem.out.println(&quot;Array after call to fill the range(2,6):&quot; + Arrays.toString(intArray));\r\n\t}\t\t\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fills-the-specified-range-from-fromIndex-to-toIndex.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118360\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fills-the-specified-range-from-fromIndex-to-toIndex.png\" alt=\"Fills the specified range from fromIndex to toIndex\" width=\"616\" height=\"50\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fills-the-specified-range-from-fromIndex-to-toIndex.png 616w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Fills-the-specified-range-from-fromIndex-to-toIndex-300x24.png 300w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/a><\/p>\n<p>This is another version of the fill method wherein, we specify the particular range in the array which is to be filled with a different value. In the above program, we have specified the range [2, 6] to be filled with zeros. The other elements remain the same as shown in the output.<\/p>\n<h3><span style=\"color: #ff6600;\">#7) Sort<\/span><\/h3>\n<p><strong>Prototype:<\/strong> static void sort(int[] a)<br \/>\n<strong>Parameters: <\/strong>a=&gt; array to be sorted<br \/>\n<strong>Return Value: <\/strong>None<br \/>\n<strong>Description: <\/strong>This method sorts the array in ascending order.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main {\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\/\/ define the array\r\n\t\tint&#x5B;] intArray = {10,4,25,63,21,51,73,24,87,18};\r\n\t\t\/\/print original array\r\n\t\tSystem.out.println(&quot;The original array: &quot; + Arrays.toString(intArray));\r\n\t\t\/\/call sort method to sort the given array in ascending order\t\t\r\n\t\tArrays.sort(intArray);\r\n\t\t\/\/print altered array\r\n\t\tSystem.out.println(&quot;Sorted array:&quot; + Arrays.toString(intArray));\r\n\t}\t\t\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sort.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118361\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sort.png\" alt=\"Sort\" width=\"522\" height=\"57\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sort.png 522w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sort-300x33.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>The above program sorts an array of integers using the sort method of Arrays class and prints the sorted array.<\/p>\n<p><strong>Prototype: <\/strong>static void sort(int[] a, int fromIndex, int toIndex)<\/p>\n<p><strong>Parameters:<\/strong><\/p>\n<p>a=&gt; array from which a range is to be sorted<br \/>\nfromIndex =&gt; start index for the range<br \/>\ntoIndex=&gt; end index for the range<\/p>\n<p><strong>Return Value: <\/strong>none<\/p>\n<p><strong>Description: <\/strong>Sorts the range specified from fromIndex to toIndex in ascending order. If fromIndex=toIndex, then range to be sorted is empty.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.Arrays; \r\n\r\npublic class Main {\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\/\/ define the array\r\n\t\tint&#x5B;] intArray = {10,4,25,63,21,51,73,24,87,18};\r\n\t\t\/\/print original array\r\n\t\tSystem.out.println(&quot;The original array: &quot; + Arrays.toString(intArray));\r\n\t\t\/\/call sort method to sort the given range in the array in ascending order\t\t\r\n\t\tArrays.sort(intArray, 2, 7);\r\n\t\t\/\/print altered array\r\n\t\tSystem.out.println(&quot;Sorted range(2,7) in the array:&quot; + Arrays.toString(intArray));\r\n\t}\t\t\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sorts-the-range-specified-from-fromIndex-to-toIndex-in-ascending-order.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118363\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sorts-the-range-specified-from-fromIndex-to-toIndex-in-ascending-order.png\" alt=\"Sorts the range specified from fromIndex to toIndex in ascending order\" width=\"626\" height=\"60\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sorts-the-range-specified-from-fromIndex-to-toIndex-in-ascending-order.png 626w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/Sorts-the-range-specified-from-fromIndex-to-toIndex-in-ascending-order-300x29.png 300w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/a><\/p>\n<p>The above program demonstrates the variation of sort method. In this, we can specify a range over which the array is to be sorted. The elements out of this range are not sorted. In the above program, the range [2,7] in the given array is specified to be sorted in the sort method.<\/p>\n<p>Hence in the output, we can see that only the elements in this range are sorted in ascending order.<\/p>\n<h3><span style=\"color: #ff6600;\">#8) toString<\/span><\/h3>\n<p><strong>Prototype: <\/strong>static String toString(int[] a)<br \/>\n<strong>Parameters: <\/strong>a=&gt; array whose string representation is required<br \/>\n<strong>Return Value: <\/strong>string=&gt; string representation of array<br \/>\n<strong>Description: <\/strong>Converts the given array into its string representation.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.*;\r\n\r\npublic class Main\r\n{\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\/\/declare arrays of type int and double\r\n\t\tint&#x5B;] intArray = {10,20,30,40,50};\r\n\t\t\r\n\t\tdouble&#x5B;] dblArray = {1.0,2.0,3.0,4.0,5.0};\r\n\t\t\r\n\t\tSystem.out.println(&quot;String representation of int Array: &quot;);\r\n\t\t\/\/print string representation of int array using toString\r\n\t\tSystem.out.println(Arrays.toString(intArray));\r\n\t\t\r\n\t\tSystem.out.println(&quot;\\nString representation of double Array: &quot;);\r\n\t\t \/\/print string representation of double array using toString\t\r\n\t\tSystem.out.println(Arrays.toString(dblArray));\r\n\t}\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/toString.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118366\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/toString.png\" alt=\"toString\" width=\"361\" height=\"118\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/toString.png 361w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/toString-300x98.png 300w\" sizes=\"(max-width: 361px) 100vw, 361px\" \/><\/a><\/p>\n<p>In the above example, we have used the toString method that converts the arrays to a string representation. So to demonstrate this method, we have used two arrays each of type int and double. Then using the toString method, each of this array is converted to its corresponding string representation shown in the output.<\/p>\n<h3><span style=\"color: #ff6600;\">#9) hashCode<\/span><\/h3>\n<p><strong>Prototype:<\/strong> static int hashCode(int[] a)<br \/>\n<strong>Parameters: <\/strong>a=&gt; array whose hashcode is to be computed.<br \/>\n<strong>Return Value: <\/strong>int=&gt; hashcode computed<\/p>\n<p><strong>Description: <\/strong>The method returns the hashcode of a given array. The <strong>hashcode<\/strong>\u00a0of a\u00a0<strong>Java<\/strong> Object is actually a 32-bit number (signed int). Using hashcode you can manage an object using hash-based structure.<\/p>\n<p>Hashcode is allocated by JVM to an object and is usually unique unless the two objects are equal to each other in which case both the objects will have the same hashcode.<\/p>\n<p><span style=\"text-decoration: underline; color: #ff6600;\"><strong>Example:<\/strong><\/span><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nimport java.util.*;\r\n\r\npublic class Main\r\n{\r\n\tpublic static void main(String&#x5B;] args) {\r\n\t\t\r\n\t\t\/\/declare arrays of type int\r\n\t\tint&#x5B;] intArray = {10,20,30,40,50};\r\n\t\t\/\/print the input array\r\n\t\tSystem.out.println(&quot;The input Array: &quot; + Arrays.toString(intArray));\r\n\t\t\/\/get hashcode of the array using 'hashCode' method of array\r\n\t\tinthashCde = Arrays.hashCode(intArray);\r\n\t\t\/\/print the hashCode\t\r\n\t\tSystem.out.println(&quot;The hashCode for input array:&quot; + hashCde);\r\n\t}\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/hashCode.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-118367\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/hashCode.png\" alt=\"hashCode\" width=\"338\" height=\"55\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/hashCode.png 338w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2020\/02\/hashCode-300x49.png 300w\" sizes=\"(max-width: 338px) 100vw, 338px\" \/><\/a><\/p>\n<p>The hashCode method computes the hashcode for the given array passed as an argument to it.<\/p>\n<h3>Frequently Asked Questions<\/h3>\n<p><strong><span style=\"color: #ff6600;\">Q #1) What are java.util arrays?<\/span><\/strong><\/p>\n<p><strong>Answer:<\/strong> The class java.util.Arrays extend from the class java.lang.Object. The Arrays class contains the method to represent arrays as a list. It also contains various methods to manipulate the arrays like sorting, searching, representing arrays as strings, etc.<\/p>\n<p><strong><span style=\"color: #ff6600;\">Q #2) Which sorting is used in arrays sort in Java?<\/span><\/strong><\/p>\n<p><strong>Answer:<\/strong> The sort method of Arrays class in Java uses two sorting techniques. It uses quicksort when primitive types are used whereas when objects are used that implement comparable interface, merge sort is used.<\/p>\n<p><strong><span style=\"color: #ff6600;\">Q #3) What does Arrays.sort () method do in Java?<\/span><\/strong><\/p>\n<p><strong>Answer:<\/strong> The Arrays.sort () method in Java has various overloads using which you can perform sorting on arrays. It has overloads for sorting different primitive data type\u2019s arrays.<\/p>\n<p>In addition, the Arrays.sort () method has various overloads for sorting an array over a specified range. Apart from this, the Arrays.sort () method also allows us to sort depending on the comparator provided.<\/p>\n<p><strong><span style=\"color: #ff6600;\">Q #4) What are collections and arrays class?<\/span><\/strong><\/p>\n<p><strong>Answer:<\/strong> Collections are dynamic in nature and the class Collections provides direct methods that act on collections. Arrays are static in nature and have class Arrays that provide methods to manipulate arrays.<\/p>\n<p>But these are not direct methods i.e. Array objects cannot invoke these methods. Instead, an array object is passed as an argument to these methods.<\/p>\n<h2>Conclusion<\/h2>\n<p>Arrays class belongs to java.util package and extends from java.lang.Object class. Arrays class contains methods that are used to manipulate arrays. These methods include those used for sorting arrays, searching for a particular element in arrays, filling the array with a specific value, methods to compare arrays, etc.<\/p>\n<p>Each of these methods has various overloads that allow the programmer to invoke these methods on arrays of different data types and also on part or whole arrays.<\/p>\n<p>In this tutorial, we have discussed most of the methods of arrays class. We also saw a brief description and examples of the major methods. These examples can be replicated for various data types and we leave it you.<\/p>\n<p><strong>=&gt; <a href=\"https:\/\/www.softwaretestinghelp.com\/java\/\">Visit Here To Learn Java From Scratch.<\/a><\/strong><\/p>\n\r\n\t\t\t<div id=\"daexthefup-container\"\r\n\t\t\t\tclass=\"daexthefup-container daexthefup-layout-stacked daexthefup-alignment-center\"\r\n\t\t\t\tdata-post-id=\"118144\">\r\n\r\n\t\t\t\t<div class=\"daexthefup-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefup-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefup-title\">Was this helpful?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefup-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefup-buttons\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-yes daexthefup-button daexthefup-button-type-icon\" data-value=\"1\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-up-cls-1{fill:#c9c9c9;}.thumb-up-cls-2{fill:#e1e1e1;}.thumb-up-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_up\">\r\n                        <path class=\"thumb-up-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-up-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"20\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,9.06l-.49-.1c-.81-.17-1.61.35-1.78,1.16l-5.3,11.74c-.17.81,3.16,1.61,3.97,1.78l1.96.41c.81.17,1.61-.35,1.78-1.16l2.18-10.27c.34-1.61-.7-3.21-2.31-3.56Z\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,20h-18.67c-.83,0-1.5.67-1.5,1.5v12c0,.83.67,1.5,1.5,1.5h16.27c.71,0,1.33-.5,1.47-1.21l2.4-12c.19-.93-.53-1.8-1.47-1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-no daexthefup-button daexthefup-button-type-icon\" data-value=\"0\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-down-cls-1{fill:#c9c9c9;}.thumb-down-cls-2{fill:#e1e1e1;}.thumb-down-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_down\">\r\n                        <path class=\"thumb-down-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-down-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"13\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,38.94l-.49.1c-.81.17-1.61-.35-1.78-1.16l-5.3-11.74c-.17-.81,3.16-1.61,3.97-1.78l1.96-.41c.81-.17,1.61.35,1.78,1.16l2.18,10.27c.34,1.61-.7,3.21-2.31,3.56Z\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,28h-18.67c-.83,0-1.5-.67-1.5-1.5v-12c0-.83.67-1.5,1.5-1.5h16.27c.71,0,1.33.5,1.47,1.21l2.4,12c.19.93-.53,1.8-1.47,1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-comment\">\r\n\t\t\t\t\t<div class=\"daexthefup-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefup-comment-label\" class=\"daexthefup-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefup-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefup-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefup-comment-textarea\" class=\"daexthefup-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Type your message\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefup-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-submit daexthefup-button\">Submit<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-cancel daexthefup-button\">Cancel<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-successful-submission-text\">Thanks for your feedback!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>This Tutorial Covers the Array Class in Java and the methods of java.util.arrays Class along with Detailed Description &amp; Examples of Array Class methods: The \u2018Arrays\u2019 class is a member of the \u2018java.util\u2019 package. This is a part of the Java Collections framework and provides methods to create, access and &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Java Array Class Tutorial &#8211; java.util.Arrays Class with Examples\" class=\"read-more button\" href=\"https:\/\/www.softwaretestinghelp.com\/java-array-class-tutorial\/#more-118144\" aria-label=\"Read more about Java Array Class Tutorial &#8211; java.util.Arrays Class with Examples\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":118377,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_helpful_pro_status":1,"footnotes":""},"categories":[408],"tags":[],"class_list":{"0":"post-118144","1":"page","2":"type-page","3":"status-publish","4":"has-post-thumbnail","6":"category-java"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages\/118144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/comments?post=118144"}],"version-history":[{"count":0,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages\/118144\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media\/118377"}],"wp:attachment":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media?parent=118144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/categories?post=118144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/tags?post=118144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}