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 decimal digits of the numbers.
Write Java statements that input a file name use "ints.txt and call the readints method.Count of numbers: Sum of numbers: Average: Printed in the method
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
