Java Array Sort sort(int[] asd)

Here you can find the source of sort(int[] asd)

Description

sort

License

Open Source License

Declaration

public static int[] sort(int[] asd) 

Method Source Code

//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;
    }
}

Related

  1. sort(int[] array)
  2. sort(int[] array)
  3. sort(int[] array)
  4. sort(int[] array)
  5. sort(int[] array)
  6. sort(int[] idxs, double[] values)
  7. Sort(int[] in)
  8. sort(int[] intValues)
  9. sort(int[] keys, int[] values)