冒泡排序 冒泡排序//冒泡排序int[] a = {1, 5, 23, 52, 123, 521, 3215, 234};//决定对比的轮次for (int i = 0; i < a.length - 1; i++) { //决定对比的个数 for (int j = 0; j < a.length - 1 - i; j++) { if (a[j] > a[j + 1]) { int temp = a[j]; a[j] = a[j + 1]; a[j + 1] = temp; } }}