ArrayUtil { public static double max(double [] array) { double max = Double.MIN_VALUE; for(int i = 0; i < array.length; i++) if (array[i] > max) max = array[i]; return max; }  static double max(double [] array); static double variance(double [] array); static double percentile(double [] array, double percentile);  }
@Test public void testMax() { double [] array = new double[10]; int j = -5; for (int i = 0; i < 10; i++) array[i] = j++; assertEquals("ArrayUtil.max failed", ArrayUtil.max(array),4.0, 0.99); }