What is wrong in this code?

package arrays;

import java.util.Scanner;

public class waveprintchallenge {
static Scanner scn=new Scanner(System.in);

public static void main(String[] args) {
	int[][] arr=Takeinput();
	waveprint(arr);
	
	

}
public static int [][] Takeinput(){
	int rows=scn.nextInt();
	int [][] arr= new int[rows][];
	for(int row=0;row<rows;row++) {
		int cols=scn.nextInt();
		arr[row]=new int[cols];
		for(int col=0;col<cols;col++) {
			arr[row][col]=scn.nextInt();
		}
		
	}
	return arr;
}
public static void waveprint(int [][] arr) {
	
	for(int i=0;i<arr.length;i++) {
		if(i%2==0) {
			for(int j=0;j<arr[i].length;j++) {
				System.out.println(arr[i][j]+" ");
			}
			
		}
		else {
			for(int j=arr[i].length-1;j>=0;j--) {
				System.out.println(arr[i][j]+" ");
			}
		}
	}
	System.out.println("end");
}

}

@harsh.hj Bro read this line very carefully!
Two integers M(row) and N(column) and further M * N integers(2-d array numbers).
Now see this input

Where is your col input?