Bubble Sort Java
AI-enhanced title
class BubbleSort
int n = arr.length;
arr[j + 1] = temp;
System.out.println();
}// Driver method to test above
ob.bubbleSort(arr);
System.out.println("Sorted array");
ob.printArray(arr);