I'm using scanner to read from a txt file, and I have the following:
and I'm getting this error:Code:Scanner scan = new Scanner(new File("grades.txt"));
unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown.
I also tried putting grades.txt at c:/grades.txt and did new File("c:/grades.txt") but that still gave me the same error. Any ideas?




Reply With Quote