Rotate image it is running fine on eclispse but on ide giving error plz help me

Scanner scn = new Scanner(System.in);
	int N =scn.nextInt();
	int M =scn.nextInt();
	int[][] arr= new int[N][M];
	for(int i=0 ; i<N ; i++)
	{
		for(int j=0 ; j<M ; j++)
		{
			arr[i][j]=scn.nextInt();
		}
	}
	arre(arr);
	display(arr);
 }
 public static void arre(int[][] arr)
 {
	 for(int i=0 ; i<arr.length ; i++)
	 {
		 for(int j=i ; j<arr.length ; j++)
		 {
			 int temp=arr[i][j];
			 arr[i][j]=arr[j][i];
			 arr[j][i]=temp;

		 }
	 }
	for( int j=0 ; j<arr.length ; j++)
	{
		int l=0 ;
		int b=arr[j].length-1;
		while(l<=b)
		{
			int temp=arr[l][j];
			arr[l][j]=arr[b][j];
			arr[b][j]=temp;
			l++;
			b--;
		}
	}

 }

public static void display(int[][] arr)
{
for(int i =0 ; i<arr.length ; i++)
{
for(int j=0 ; j<arr.length ; j++)
{
System.out.print(arr[i][j] + " ");
}
System.out.println();
}
}
}

your submissions show you have scored 100! great job :slight_smile:if this solves your doubt please mark it as resolved :slight_smile: