76 939
Assignments Done
Successfully Done
In June 2019

Answer to Question #4893 in Java | JSP | JSF for John Morales

Question #4893
Create a method called avgValue, which takes an array of doubles as an input parameter and returns the average value of the entries in the array.


==> 2.2
Expert's answer
public class AvrValue {
public static double avrValue(double[] arr)
double sum = 0;
for (double d : arr)
sum += d;
return sum /

public static void main(String[] args)
System.out.println(avrValue(new double[] { 1.1, 2.5, 3.0


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions