How to take char as input through scanner?

I have used
nextLine().charAt(0);

please take a look on my code

use this :slight_smile:

for(int i=0;i<n;i++){
      String str=scan.nextLine();
      for(int j=0;j<m;j++){
          garden[i][j] =str.charAt(j);    
       }
}