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