Java Median getMedian(double array[])

Here you can find the source of getMedian(double array[])

Description

get Median

License

Open Source License

Declaration

static public double getMedian(double array[]) 

Method Source Code

//package com.java2s;
//  it under the terms of the GNU General Public License as published by      //

import java.util.Arrays;

public class Main {
    static public double getMedian(double array[]) {
        Arrays.sort(array);/*from   w  w w. j a  v a  2  s.c  o m*/
        return array[array.length / 2];
    }
}

Related

  1. calcMedian(final double[] values)
  2. calculateMedianOfArrayListInteger(List integerList)
  3. getMedian(double[] a)
  4. getmedian(double[] vals, int nvalindex)
  5. getMedian(int[] array)
  6. getMedianValue(ArrayList values)