java how to initialize a n array length code example Example: java initialize int array int[] arr = new int[n];