标签:nbsp src loading main ring rgs info aaa mamicode
public static void main(String[] args) {
int[] aa = {5, 86, 21, 231, 4, 3, 1, 74};
paixu(aa);
printaaaa(aa);
}
public static void paixu(int[] aa) {
for (int i = 0; i < aa.length - 1; i++) {
for (int o = i + 1; o < aa.length; o++) {
if (aa[i] > aa[o]) {
int p = aa[i];
aa[i] = aa[o];
aa[o] = p;
}
}
}
}
public static void printaaaa(int[] arry) {
for (int i = 0; i < arry.length; i++) {
System.out.println(arry[i]);
}
}
标签:nbsp src loading main ring rgs info aaa mamicode
原文地址:https://www.cnblogs.com/hanby/p/15021096.html