Question: Write a Java method readints ( ) that gets a string ( containing file name ) as parameter and: opens the file, reads all integers

Write a Java method readints() that gets a string (containing file name) as parameter and:
opens the file, reads all integers and prints them (on the same line),
prints the count, the sum and the average (with 2 decimal digits) of the numbers.
Write Java statements that input a file name (use "ints.txt") and call the readints() method.Count of numbers: 7Sum of numbers: 323Average: 46.14Printed in the method
Write a Java method readints ( ) that gets a

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 Programming Questions!