java initialize array to same value code example Example: java initialize array with same value Arrays.fill(array, -1);