hi,i am creating method to load a file to a scanner ready to read and i am having truble with a Cannot find symbol error
error is on line 6
anyone know the cause?
and feedback is appreciated
thanks dale
public static Scanner loadHistory()
{
// load the file
Scanner inFile = null;
try {
File myFile = new File("history.txt");
inFile = new Scanner(myFile);
}
catch(FileNotFoundException e){
System.out.println("error file not found program is closing");
System.exit(0);
}
return inFile;
}
error is on line 6
anyone know the cause?
and feedback is appreciated
thanks dale