int var[];
=> Declaring an Arrayint var[n];
=> Declaring an Array of size "n"int[] var;
=> Declaring an Arrayint[] var = {val1, val2, val3};
=> Initializing an Integer Array, We use this method when we already know the elements of the Arrayint[] var = new int[n];
=> Initializing an Integer Array of size "n"var[n];
=> Returns the value at that Indexvar[n] = val;
=> Assign a value at that Indexvar.length;
=> Returns length of Array, It is a property of a Array not a FunctionArray.sort(var);
=> Sorts the Array in ascending order using sort Function from Array Class int[][] var = {{val1, val2, val3}, {val4, val5, val6}
var[n1][n2];
=> Accessing value of 2D Array ArrayList<Integer> var = new ArrayList<Integer>();
ArrayList<String> var = new ArrayList<String>();
ArrayList<Integer> var = new ArrayList<Integer>(Array.asList(val1, val2, val3));
var[n] = val
=> Insert a valuevar.size();
=> Returns length of Arrayvar.add(val)
=> Insert the given value at the endvar.add(n, val)
=> Insert the value at index "n"var.sort(Comparator.naturalOrder())
=> Sorts the Array in ascending ordervar.sort(Comparator.reverseOrder())
=> Sorts the Array in descending orderSystem.out.println(var)
=> Print all elements of ArrayList