array in Java

An array is an area of memory on the heap with space for a fixed number of elements.
You can type the [] before or after the name, but the behaviour is not the same when declare multiple arrays in one declaration.
```
public class Main {
    public static void main(String args[]) {
        int[] a1 = new int[3], a2 = new int[4];
        int b1[] = new int[3], b2 = 3;
        int[] c[] = new int[3][];
    }
}
```
The java.util.Arrays class contains various static methods for sorting and searching arrays, comparing arrays, and filling array elements. These methods are overloaded for all primitive types.
Method | Description
----- | -----
public static \<T> List\<T> asList(T... a) | It takes an array and creates a wrapper that implements List\<Integer>, which makes the original array available as a list. Nothing is copied, only a single wrapper object is created. Operations on the list wrapper are propagated to the original array. Some List operations aren't allowed on the wrapper, like adding or removing elements from the list, you can only read or overwrite the elements. 
public static int binarySearch(Object[] a, Object key) | Searches the specified array of Object (Byte, Int, double, etc.) for the specified value using the binary search algorithm. The array must be sorted prior to making this call, otherwise, the result is not predictable. This returns index of the search key, if it is contained in the list; otherwise, it returns ( – (insertion point + 1)), where insertion point is place to be inserted to preserver sorted order.
 copyOf(int[] original, int newLength)  | It copies the specified array, truncating or padding with false (if necessary) so the copy has the specified length.
public static boolean equals(long[] a, long[] a2) | Returns true if the two specified arrays of longs are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. This returns true if the two arrays are equal. Same method could be used by all other primitive data types (Byte, short, Int, etc.)
public static void fill(int[] a, int val) | Assigns the specified int value to each element of the specified array of ints. The same method could be used by all other primitive data types (byte, short, integer, etc.)
public static void sort(Object[] a) | Sorts the specified array of objects into an ascending order, according to the natural ordering of its elements. The same method could be used by all other primitive data types ( Byte, short, Int, etc.)