Here you can find the source of swap(double[] array, int i, int j)
private static void swap(double[] array, int i, int j)
//package com.java2s; import java.util.List; public class Main { private static void swap(List list, int i, int j) { Object tmp = list.get(i); list.set(i, list.get(j));/* w w w. j av a 2 s . c o m*/ list.set(j, tmp); } private static void swap(double[] array, int i, int j) { double tmp = array[i]; array[i] = array[j]; array[j] = tmp; } }