What is the error in the code


ALSO LET ME KNOW HOW TO DIRECTLY SHARE MY CODE FROM CODING BLOCKS IDE.
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in) ;
int row = scan.nextInt() ;
int col = scan.nextInt() ;
char[][] maze = new char[row][col] ;
int[][] solBoard = new int[row][col] ;

for(int i=0;i<row;i++) {
	for(int j=0;j<col;j++) {
		maze[i][j]=scan.next().charAt(0);
	}
}
if(ratmaze(maze,0,0,solBoard))
{
	display(solBoard);
}
else
{
	System.out.println(-1);
}

}
public static boolean ratmaze(char[][]maze,int row,int col,int[][] solboard) 
{
	if(row==maze.length-1 && col==maze[0].length-1) {
		solboard[row][col]=1;
		return true;
	}
	if(row==-1||row==maze.length||col==-1||col==maze[0].length||maze[row][col]=='x') 
	{   
		return false;
	}
	
	
	solboard[row][col]=1;
	boolean right=ratmaze(maze,row,col+1,solboard);
	boolean down= ratmaze(maze,row+1,col,solboard);
	if(right || down) {
		return true;
	}
	else 
	{
		solboard[row][col]=0;
		return false;
	}
	//return true;
}
public static void display(int[][] solBoard){

	for(int i = 0 ; i < solBoard.length ; i ++){
		for(int j = 0 ; j < solBoard[0].length ; j ++){
			System.out.print(solBoard[i][j]+" ") ;
		}
		System.out.println() ;
	}
}

}

@Par1hsharma,
Reviewing your code.

To share your code, save the code and share the link.

Also, please mark your previous post as resolved since you withdraw your message.

Apparently the share option is not working on the coding blocks ide.

@Par1hsharma,
Replied on the other doubt

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.