冒泡排序整数数组
//nowjava 提供 //package com.nowjava; public class Main { public static void BubbleSort(int[] array) { int size = array.length; for (int i = 0; i < size - 1; i++) { boolean hasSwap = false; for (int j = i + 1; j < size; j++) { if (array[j] < array[i]) { // swap int temp = array[i]; array[i] = array[j]; array[j] = temp;/* 来自 时代Java - N o w J a v a . c o m*/ hasSwap = true;