how to decleare an array in java code example Example: how to decleare an array in java int[] arr = new int[n]; // n = size of array