Assume an object of the Scanner class called inputFile was declared and is going to be used to read from the "Names.txt"
Posted: Fri Jul 08, 2022 6:40 am
Assume an object of the Scanner class called inputFile was declared and is going to be used to read from the "Names.txt" file. If an IOException occurs, it should be caught and the error message should be printed to the console. Regardless of whether an Exception is caught or not, close the file. } } } { inputFile = new Scanner(new File("Names.txt")); inputFile.nextLine(); . (______ e) { System.out.println(e._ __0); { inputFile.close();