Here you can find the source of maxSort(double[] arr)
public static double[] maxSort(double[] arr)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] maxSort(double[] arr) { double[] sortArray = arr; for (int i = 0; i < sortArray.length - 1; i++) { for (int j = 0; j < sortArray.length - 1; j++) { if (sortArray[j] < sortArray[j + 1]) { double temp = sortArray[j]; sortArray[j] = sortArray[j + 1]; sortArray[j + 1] = temp; }/*from w w w . j ava 2s .co m*/ } } return sortArray; } }