(int [] arr)
| 45 | public class BubbleSort { |
| 46 | |
| 47 | public static void printArray(int [] arr) { |
| 48 | System.out.println("The sorted array is: "); |
| 49 | int n = arr.length; |
| 50 | for (int i = 0; i < n; i++) { |
| 51 | System.out.print(arr[i] + " "); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | public static void bubbleSort(int [] arr) { |
| 56 | int n = arr.length; |