Question: QUESTION 3 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():

 QUESTION 3 What happens after running the following code? Scanner inFile

QUESTION 3 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 Prints the following to a console: Name: Ahmed and score: 100.00 Prints the following to a console: Name: Ahmed and score: 100.01 Prints the following to a console: Name: Fatma and score: 98.0 Prints the following to a console: Name: Ahmed and score: 100.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!