title: Finding the max/min value in an array of primitives using Java
body: <p>It's trivial to write a function to determine the min/max value in an array, such as:</p>
  
  <pre><code>/**
   * 
   * @param chars
   * @return the max value in the array of chars
   */
  private static int maxValue(char[] chars) {
      int max = chars[0];
      for (int ktr = 0; ktr &lt; chars.length; ktr++) {
          if (chars[ktr] &gt; max) {
              max = chars[ktr];
          }
      }
      return max;
  }
  </code></pre>
  
  <p>but isn't this already done somewhere?</p>