previous | start | next

Application using Stats Utility Class


public class StatsApp
{
  
  public static void main(String[] args)
  {
    double[] a = new double[] {86.0, 91.5, 88.0, 93.0, 94.0};

    double max = Stats.maximum(a);
    double avg = Stats.mean(a);
    System.out.printf("max = %.2f, mean = %.2f\n", max, avg);
  }

}



previous | start | next