### Question:
VectorUtil { public static int maxIndex(final double[] a) { int result = -1; double max = Double.NEGATIVE_INFINITY; for (int i = 0; i < a.length; i++) { if (a[i] > max) { max = a[i]; result = i; } } return result; } private  VectorUtil(); static int maxIndex(final double[] a);  }### Answer:
@Test public void testMaxIndex() { final double[] a = {2, 4, 10, 8}; assertEquals(2, VectorUtil.maxIndex(a), AIFH.DEFAULT_PRECISION); }