I have used
nextLine().charAt(0);
please take a look on my code
I have used
nextLine().charAt(0);
please take a look on my code
use this
for(int i=0;i<n;i++){
String str=scan.nextLine();
for(int j=0;j<m;j++){
garden[i][j] =str.charAt(j);
}
}