Here you can find the source of swap(int i, int j, Integer[] unsorted)
public static void swap(int i, int j, Integer[] unsorted)
//package com.java2s; //License from project: Apache License public class Main { public static void swap(int i, int j, Integer[] unsorted) { Integer t = unsorted[i];/* w w w. j av a2s. co m*/ unsorted[i] = unsorted[j]; unsorted[j] = t; } public static void swap(int i, int j, int[] unsorted) { Integer t = unsorted[i]; unsorted[i] = unsorted[j]; unsorted[j] = t; } }