it is showing “The method display(int[]) is undefined for the type bubblesort1” in display(arr); line.
public class bubblesort1 {
public static void main(String[] args) {
int[] arr = {88,66,55,44,22};
bubblesort(arr);
display(arr);
}
public static void bubblesort(int[] arr ) {
for(int counter = 0; counter < arr.length-1; counter++) {
for(int j=0; j<arr.length - 1 - counter; j++) {
if(arr[j] > arr[j+1]) {
int temp=arr[j];
arr[j]= arr[j+1];
arr[j+1]=temp;
}
}
}
}
}