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