我完全陷入了本周末的家庭作业.
由于一些愚蠢的原因,我的递归遍历在它到达我的迷宫('E')结束时并没有停止,而是继续前进.
这是读者:
public class mainProg {
public static void main(String[] args) {
// The name of the file to open.
Scanner reader = new Scanner(System.in); // Reading from System.in
System.out.println("Enter the name of textfile to be read ( add .txt): ");
String fileName = reader.next();
char temp;
// This will reference one line at a time
String line = null;
int count = 1;
int heightCounter = 0;
try {
// FileReader reads text files in the default encoding. …Run Code Online (Sandbox Code Playgroud)