import java.util.Scanner;
public class Maze {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int rows = 0;
int cols = 0;
String arrayLine = "";
int counter = 0;
rows = sc.nextInt();
cols = sc.nextInt();
arrayLine = sc.next();
char[][] array = new char[rows][cols];
for(int r=0; r<rows; r++){
for (int c=0; c<cols; c++){
array[r][c] = arrayLine.charAt(counter);
counter ++;
}
}
System.out.println(array);
System.out.println();
}
}
我从中引入信息的文件是:
8
7
000000011111S0000000110101111010101100010110111011010E00
我运行它时得到的输出是[[C@252f0999
请帮忙,我刚开始学习java!