Bubble sorting , plz find mistake

package project_1;

public class BubbleSort {

public static void main(String[] args) 
{
  int[] arr= {50,40,30,20,10};
 BubbleSort(arr);
   display(arr);
}
 	public static void BubbleSort(int[] arr) {
public static void display(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;
	        }
	}
        
   }
}

}
}

@Manan-Kanswal-2097696493645790,

https://ide.codingblocks.com/s/229488 corrected code.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.