Language: Java

import java.util.Scanner;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int H = sc.nextInt();//マス目の設定
        int W = sc.nextInt();
        map=new String [H][W];
       	
      
      	for(int i=0;i<H;i++) {//データの打ち込み
          for(int j=0;j<W;j++){
			map[i][j]=sc.nextInt();
          }
		}
      
      	for(int i=0;i<H;i++) {//変換
          for(int j=0;j<W;j++){
           	if(map[i][j]=="."){
              map[i][j]=0;
              
              if(map[i][j+1]=="#"){
				map[i][j]+=1;
              }
              if(map[i][j-1]=="#"){
				map[i][j]+=1;
              }
              if(map[i+1][j]=="#"){
				map[i][j]+=1;
              }
              if(map[i-1][j]=="#"){
				map[i][j]+=1;
              }
              if(map[i+1][j+1]=="#"){
				map[i][j]+=1;
              }
              if(map[i-1][j+1]=="#"){
				map[i][j]+=1;
              }
              if(map[i+1][j-1]=="#"){
				map[i][j]+=1;
              }
              if(map[i-1][j-1]=="#"){
				map[i][j]+=1;
              }
              
           	}
          }
		}
      
      
      for(int i=0;i<H;i++) {//データの書き出し
        for(int j=0;j<W-1;j++){
			System.out.print(map[i][j]);
        }
		System.out.println(map[i][W]);
	  }
      
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
        map=new String [H][W];
        ^
  symbol:   variable map
  location: class Main
Main.java:14: error: cannot find symbol
			map[i][j]=sc.nextInt();
			^
  symbol:   variable map
  location: class Main
Main.java:20: error: cannot find symbol
           	if(map[i][j]=="."){
           	   ^
  symbol:   variable map
  location: class Main
Main.java:21: error: cannot find symbol
              map[i][j]=0;
              ^
  symbol:   variable map
  location: class Main
Main.java:23: error: cannot find symbol
              if(map[i][j+1]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:24: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:26: error: cannot find symbol
              if(map[i][j-1]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:27: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:29: error: cannot find symbol
              if(map[i+1][j]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:30: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:32: error: cannot find symbol
              if(map[i-1][j]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:33: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:35: error: cannot find symbol
              if(map[i+1][j+1]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:36: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:38: error: cannot find symbol
              if(map[i-1][j+1]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:39: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:41: error: cannot find symbol
              if(map[i+1][j-1]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:42: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:44: error: cannot find symbol
              if(map[i-1][j-1]=="#"){
                 ^
  symbol:   variable map
  location: class Main
Main.java:45: error: cannot find symbol
				map[i][j]+=1;
				^
  symbol:   variable map
  location: class Main
Main.java:55: error: cannot find symbol
			System.out.print(map[i][j]);
			                 ^
  symbol:   variable map
  location: class Main
Main.java:57: error: cannot find symbol
		System.out.println(map[i][W]);
		                   ^
  symbol:   variable map
  location: class Main
22 errors