import java.util.Arrays; public final class ArrayLength { public static void testArray2(Object[] x, Object[] y, int a) { if(x[a] == null && a == x.length) { System.out.println("Impossible"); } y[0] = 1; if(y.length > 0) { System.out.println("Always"); } } public static void testArray(int[] x, int a) { x[-1] = -2; x[x.length] = -1; x[a] = 6; if(a < 0) { System.out.println("never"); } } public static void testArrayMethods(int[] x) { Arrays.fill(x, 0, 10, -1); if(x.length < 10) { System.out.println("Impossible"); } Arrays.fill(x, -1); Arrays.fill(x, -1, -1, -1); } }