Question: Rewrite Programming Exercise 7.8 using streams. Data from Programming Exercise 7.8 Write two overloaded methods that return the average of an array with the following
Rewrite Programming Exercise 7.8 using streams.
Data from Programming Exercise 7.8
Write two overloaded methods that return the average of an array with the following headers:
public static double average(int[] array)
public static double average(double[] array)
Write a test program that prompts the user to enter 10 integers, invokes the first method, then displays the average value; prompts the user to enter 10 double values, invokes the second method, then displays the average value.
Step by Step Solution
3.48 Rating (161 Votes )
There are 3 Steps involved in it
import javautilScanner import javautilScanner import ja... View full answer
Get step-by-step solutions from verified subject matter experts
