Class ArrayMax

java.lang.Object
com.zybooks.dsaj.primer.ArrayMax

public class ArrayMax extends Object
Demonstration of a recursive method to find the maximum value in an array.
  • Constructor Details

    • ArrayMax

      public ArrayMax()
  • Method Details

    • max

      public static double max(double[] data)
      Returns the maximum value within a nonempty array of doubles.
      Parameters:
      data - a nonempty array of numeric values
      Returns:
      the maximum value among the data