Here you can find the source of sort(int[] asd)
public static int[] sort(int[] asd)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] sort(int[] asd) { int[] sorted = asd.clone(); for (int i = 0; i < sorted.length; i++) { for (int j = i + 1; j < sorted.length; j++) { if ((sorted[i] > sorted[j]) && (i != j)) { int temp = sorted[j]; sorted[j] = sorted[i]; sorted[i] = temp;/* w ww . j a v a 2s . co m*/ } } } return sorted; } }