title: How to find the median for an array of numbers for java?
body: <pre><code>public double median(){
  double input =0;
  double answer =sum() * (input) / data.length;
      return answer;
      }
  </code></pre>
  
  <p>This is my code I have for median but it keeps returning as zero when I run the program. The array of numbers are: {3.0, 15.0, 7.0, 27.0};</p>