Question: What happens after running the following code? Scanner inFile = new Scanner(new FileReader(prog.txt)); double score; String name; name = inFile.next(); score = inFile.nextInt(); System.out.println(Name: %s
What happens after running the following code? Scanner inFile = new Scanner(new FileReader("prog.txt")); double score; String name; name = inFile.next(); score = inFile.nextInt(); System.out.println("Name: %s and score: %.1f", name, score); prog.txt: Ahmed 100 Fatma 98
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
