I'm wondering which particular requirements are not met by my code if it produces the expected output...
package en.codegym.task.pro.task05.task0516;
import java.util.Arrays;
/*
Filling an array
*/
public class Solution {
public static int[] array = new int[20];
public static int valueStart = 10;
public static int valueEnd = 13;
public static void main(String[] args) {
//write your code here
if (array.length % 2 == 0) {
Arrays.fill(array, 0, (array.length / 2), valueStart);
Arrays.fill(array, array.length / 2, array.length, valueEnd);
}
else {
Arrays.fill(array, 0, (array.length / 2 + 2), valueStart);
Arrays.fill(array, (array.length / 2 + 2), array.length, valueEnd);
}
System.out.println(Arrays.toString(array));
}
}