Showing error , written inside class waveprint

public class waveprint {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	int[][]arr= {{11,12,13,14},{21,22,23,24},{31,32,33,34},{41,42,43,44}};
	printrow(arr);

}

public static void printrow(int[][]arr) {
	
	for(int i=0;i<=arr.length;i++)  
	{
		
		if(i%2==0) 
		{
			
			for(int j=0;j<=arr.length;j++)  
			{
				
				System.out.println(arr[i][j]+" ");
			}
		}
		else
		{
			for(int j=arr.length;j<=0;j--)
			{
				System.out.println(arr[i][j]+" ");
			}
		}
	}
		
	
}

}

@Manan-Kanswal-2097696493645790,
https://ide.codingblocks.com/s/242880 corrected code.

Don’t do

		for (int i = 0; i <=arr.length; i++) {

Instead do:

		for (int i = 0; i < arr.length; i++) {

Array index are from 0 to size-1. Don’t go till index = size.

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.