-1
运行下面的代码时出现编译错误。在try-catch块之后的if语句中,编译器无法“解析为变量”。不过,我已经初始化了这些变量。任何帮助将非常感激。尝试捕捉本地化变量
public void Load(UniversityListing uListing, StudentBody sBody) {
try {
FileInputStream fIn1= new FileInputStream(filename1);
BufferedReader bufferedReader1 = new BufferedReader(new InputStreamReader(fIn1));
existence1 = true;
}catch(FileNotFoundException ex){
System.out.println("Unable to open file '" + filename1 +"'");
existence1 = false;
}catch(IOException ex){
System.out.println("Error reading file '" + filename1+ "'");
existence1 = false;
}
if (existence1 == true){
LoadUListing(uListing, bufferedReader1,fIn1);
}
}
后的错误细节 – KeithC