-
于海涛有梅毒
-
于海涛有梅毒
-
英伟达会有4090ti么
-
guest说:
用Java语言输出冒泡排序
public class BubbleSort { public static void bubbleSort(int[] arr) { int n = arr.length; for (int i = 0; i arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } } public static void main(String[] args) { int[] arr = {64, 34, 25, 12, 22, 11, 90}; bubbleSort(arr); System.out.println("排序后的数组:"); for (int i : arr) { System.out.print(i + " "); } } }