Here you can find the source of sort(double[] vector, boolean ascending)
public static void sort(double[] vector, boolean ascending)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static void sort(double[] vector, boolean ascending) { Arrays.sort(vector);//from w ww .jav a2 s.c o m if (!ascending) { for (int i = 0; i <= (vector.length - 1) / 2; i++) { double tmp = vector[i]; vector[i] = vector[vector.length - i - 1]; vector[vector.length - i - 1] = tmp; } } } }